Input: Sentence: 'A hand cutting a frosted cake with red flowers on it'. Count the number of nouns in this sentence.
Output: 3