A fruit stand sells apples and bananas. Each apple costs $1.20 and each banana costs $0.80. If a customer buys a total of 10 fruits and spends $10.40, how many apples did the customer purchase?