Input: Sentence: 'Several giraffes scattered in a field among trees'. Count the number of nouns in this sentence.
Output: 3