Input: Sentence: 'A medicine cabinet that is on a wall in a room'. Count the number of nouns in this sentence.
Output: 4