Input: Sentence: 'A compartmentalized tray holds a variety of food'. Count the number of nouns in this sentence.
Output: 3