Input: Sentence: 'A man riding his surfboard through the waves'. Count the number of nouns in this sentence.
Output: 3