Input: Sentence: 'A young man riding on the back of a white horse'. Count the number of nouns in this sentence.
Output: 3