Input: Sentence: 'A person with a hat and tie on yells'. Count the number of nouns in this sentence.
Output: 3