Input: Sentence: 'A man sitting on the beach next to a surfboard'. Count the number of nouns in this sentence.
Output: 3