Input: Sentence: 'A young man taking a swing at a  baseball'. Count the number of nouns in this sentence.
Output: 3