Input: Sentence: 'A cake decorated with a pair of infant shoes, flowers and a name'. Count the number of nouns in this sentence.
Output: 6