Input: Sentence: 'a woman in a red shirt is riding an elephant'. Count the number of nouns in this sentence.
Output: 3