you would need to forced the users to login.
and when placing and order store the users ID in the orders table.
See the Tutorials for adding user registration to the checkout process and for creating an order history for details.
after the user is logged in, create a record to look up the number of orders placed, much like the order history recordset. you can use that recordset to trigger the discount if it returns more than 5 rows.