Input: Sentence: 'Two giraffes are housed in a pen'. Count the number of nouns in this sentence.
Output: 2