Input: Sentence: 'A girl walking on a path near a person on a bench'. Count the number of nouns in this sentence.
Output: 4