Input: Sentence: 'Two giraffes in the middle of a green pasture'. Count the number of nouns in this sentence.
Output: 3