Input: Sentence: 'Baseball player in the motion of swinging at a baseball coming towards him'. Count the number of nouns in this sentence.
Output: 4