Input: Sentence: 'A man throws his kite into the air on a beach'. Count the number of nouns in this sentence.
Output: 4