the idea is that when an order is p,aced, a new record is stored in the order table. in the order table you store the coupon code that was used.
the count() function returns a count of the number of rows in the database.
lets say the coupon code is "12345" and there are 8 records in the database where that coupon code was used. the recordset:
SELECT COUNT(OrderID) as timesRedeemed FROM orders WHERE couponCode = "12345"
would return the value 8, "timesRedeemed" is an alias given to the result.