Input: Sentence: 'an elephant standing on its hind legs smiling'. Count the number of nouns in this sentence.
Output: 3