Input: Sentence: 'a window with shelves displaying colorful glasses and pitchers'. Count the number of nouns in this sentence.
Output: 4