Input: Sentence: 'A pretty woman laying in bed with a bulldog under her pillows'. Count the number of nouns in this sentence.
Output: 4