The ratio of the number of pigs to the number of horses in a farm is 2 to 2(2:3), if there are 24 horses, what is the number of pigs?