Input: Sentence: 'A man is standing by a fence holding a tennis racket'. Count the number of nouns in this sentence.
Output: 4