Input: Sentence: 'a man two girls and a brown and black dog'. Count the number of nouns in this sentence.
Output: 3