A farmhouse shelters 10 animals, some are pigs, and some are ducks. Altogether there are 36 legs. How many pigs are there