Input: Sentence: 'A man that is riding on the back of an elephant'. Count the number of nouns in this sentence.
Output: 3