Sarah went shopping at a store and bought some hats that cost $6 each and 2 necklaces that cost $12 each. The cost of Sarah’s total purchases was $66. How many hats did Sarah buy?