A farmer bought a number of pigs for $182. However, 4 of them died before he could sell the rest at a profit of 10 per pig. His total profit was $192. How many pigs did he originally buy?