“Stock-Breeding”

From John Scott, The Puzzle King, 1899:

“A farmer, being asked what number of animals he kept, answered: ‘They’re all horses but two, all sheep but two, and all pigs but two.’ How many had he?”

Click for Answer