Input: Sentence: 'A photograph of a highly decorated cake on a table'. Count the number of nouns in this sentence.
Output: 3