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