Input: Sentence: '2 jars of green-colored canned preserves next to two green tomatoes'. Count the number of nouns in this sentence.
Output: 4