Richard orders medals from a wholesaler. Each model costs 5.75 if a customer purchases at least twenty model at a time. A one-time shipping fee of 8.00 is added to the cost of the order. The total cost of Richard's order before tax is 163.25. How many medals did Richard order?