Input: Sentence: 'a male wearing a black robe and hat is holding a keyboard'. Count the number of nouns in this sentence.
Output: 4