Kate bought a hat that costs $12 and a watch that costs $20. At the counter, she received a discount. If she only paid $30 total, how many dollars was the discount?

A) $2
B) $8
C) $10
D) $22