Input: Sentence: 'A man sleeping on a wooden bench next to a bag of luggage'. Count the number of nouns in this sentence.
Output: 4