Input: Sentence: 'An elephant walking behind a man in a park'. Count the number of nouns in this sentence.
Output: 3