Input: Sentence: 'Three people are riding on top of the elephant'. Count the number of nouns in this sentence.
Output: 3