Input: Sentence: 'a croissant on a plate near a beverage on a table'. Count the number of nouns in this sentence.
Output: 4