Input: Sentence: 'A black cat wearing a yellow bow tie'. Count the number of nouns in this sentence.
Output: 3