Input: Sentence: 'A white and black horse sticking its head over a yellow fence'. Count the number of nouns in this sentence.
Output: 3