How do I find the answer to this word problem. Farmer Doug has some pigs and chickens. One day he counted 24 legs and 7 heads in the barnyard. How many of each animal did Farmer Doug count?