Mr Ong bought some goldfishes at $7 each. He also bought an equal number of swordtails at a different price. The average price of a goldfish and a swordtail was $5. Mr Ong paid $24 less for the swordtails than the goldfishes. How many goldfishes did he buy?