Input: Sentence: 'a close up of a cake with a horse'. Count the number of nouns in this sentence.
Output: 3