Sam is planning to buy fruit for a party. He decides to buy bananas and apples. The cost of each banana is $0.60 and each apple is $0.75. If Sam buys a total of 10 fruits and spends exactly $6.30, how many bananas did he buy?