Input: Sentence: 'A young girl playing with a piece of cake'. Count the number of nouns in this sentence.
Output: 3