Input: Sentence: 'A pair of giraffes looking in the opposite direction of each other'. Count the number of nouns in this sentence.
Output: 3