Input: Sentence: 'A man on a surf board riding the waves'. Count the number of nouns in this sentence.
Output: 4