Input: Sentence: 'A surfer rides the top of a wave in the ocean'. Count the number of nouns in this sentence.
Output: 4