Input: Sentence: 'A homeless man sleeping on a city bench'. Count the number of nouns in this sentence.
Output: 3