Input: Sentence: 'A person is swinging a tennis racket at a ball on a court'. Count the number of nouns in this sentence.
Output: 5