Input: Sentence: 'a bed resting in the middle of a room next to a dresser'. Count the number of nouns in this sentence.
Output: 4