Input: Sentence: 'A horse eating hay in a open yard'. Count the number of nouns in this sentence.
Output: 3