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