After passing away, a rich farm owner had left his 3 sons a dubious will, which stated that:
The eldest son will inherit of all horses in the farm.
The middle son will inherit of all horses in the farm.
The youngest son will inherit of all horses in the farm.
However, no matter how hard the 3 brothers tried to follow these divisions, they could not settle at the right numbers, and any horse couldn't be divided into pieces or fraction. Disputed, they consulted their family's lawyer about this impossible matter.
Then after giving some thoughts, the wise lawyer promised that each heir would earn the number of horses as the will instructed though each of them would need to donate one horse to him afterwards as the lawyer fee.
After signing such agreements, the lawyer instantly distributed the horses into the right amounts for the 3 brothers according to the will, without selling or buying any horses into the farm. As a matter of fact, he did not keep any horses for his fee and only said so to help out for his late master.
How many horses were there in the farm?