Input: Sentence: 'Discarded teddy bear peeks out of garbage bag'. Count the number of nouns in this sentence.
Output: 4