Input: Sentence: 'A picture of a person on a horse'. Count the number of nouns in this sentence.
Output: 3