Answer:
38
Step-by-step explanation:
If all had bought the plain cap, the bill would be $4×40 = $160. The bill is $76 more than that.
Each deluxe cap purchased adds $2 to the total bill (above the cost of a plain cap), so there must have been $76/$2 = 38 deluxe caps purchased.