Input: Sentence: 'Two people relax at the beach while a man surfs'. Count the number of nouns in this sentence.
Output: 3