Input: Sentence: 'A baseball player waiting for the pitch to come his way'. Count the number of nouns in this sentence.
Output: 4