Input: Sentence: 'A man laughs while sitting on a bench'. Count the number of nouns in this sentence.
Output: 2