Input: Sentence: 'A man flying a kit on the beach'. Count the number of nouns in this sentence.
Output: 3