Input: Sentence: 'A young boy swinging a baseball bat towards  a ball'. Count the number of nouns in this sentence.
Output: 4