Input: Sentence: 'A birthday cake is shaped like a teddy bear'. Count the number of nouns in this sentence.
Output: 4