Input: Sentence: 'A man in a white jersey attempting to hit a baseball'. Count the number of nouns in this sentence.
Output: 3