Input: Sentence: 'Baseball player swinging bat to hit approaching baseball'. Count the number of nouns in this sentence.
Output: 4