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