Input: Sentence: 'a small dog is looking at a horse'. Count the number of nouns in this sentence.
Output: 2