Input: Sentence: 'Two giraffes in a field with lots of trees behind them'. Count the number of nouns in this sentence.
Output: 4