Input: Sentence: 'two pigs in a field with red trees'. Count the number of nouns in this sentence.
Output: 3