Input: Sentence: 'A number of heart shaped boxes stacked on top of each other'. Count the number of nouns in this sentence.
Output: 4