Input: Sentence: 'The player waits for the pitch to swing the bat'. Count the number of nouns in this sentence.
Output: 3