The number of heads on the farm, as determined by the farmer, was 60. When he counted, he discovered there were 150 legs. If all that was present were pigeons or horses, and every horse on the property had four legs while every pigeon had two, how many horses were there on the property?