Input: Sentence: 'a baseball player attempting to throw a ball'. Count the number of nouns in this sentence.
Output: 3