Input: Sentence: 'A brown horse grazing in its fenced in pen'. Count the number of nouns in this sentence.
Output: 2