Input: Sentence: 'Two men sit together while one holds a tennis racket'. Count the number of nouns in this sentence.
Output: 3