Mr Quek bought some swordtails at $6 each. He also bought an equal number of guppies at a different price. The average price of a swordtail and a guppy was $5. Mr Quek paid $12 less for the guppies than the swordtails. How many swordtails did he buy?