Input: Sentence: 'People watching an elephant painting a picture of a plant'. Count the number of nouns in this sentence.
Output: 4