Input: Sentence: 'A man on a surfboard riding a wave'. Count the number of nouns in this sentence.
Output: 3