Input: Sentence: 'The giraffe is standing directly under a tree'. Count the number of nouns in this sentence.
Output: 2