Input: Sentence: 'a room with a desk and a cat in a chair'. Count the number of nouns in this sentence.
Output: 4