Input: Sentence: 'A bed with two pillows under a window'. Count the number of nouns in this sentence.
Output: 3