Input: Sentence: 'A boy holds his surfboard and contemplates the surf on a crowded beach'. Count the number of nouns in this sentence.
Output: 4