Input: Sentence: 'a person in a red robe is riding a brown and black horse'. Count the number of nouns in this sentence.
Output: 3