Input: Sentence: 'A cat sitting on a bench next to a man eating a sandwich'. Count the number of nouns in this sentence.
Output: 4