Input: Sentence: 'An officer is sitting still on a horse'. Count the number of nouns in this sentence.
Output: 2