Input: Sentence: 'A horse grazing on grass in the woods'. Count the number of nouns in this sentence.
Output: 3