Input: Sentence: 'a tennis player swing a racket at a ball'. Count the number of nouns in this sentence.
Output: 4