Input: Sentence: 'A cake with a train on a track and a ground made of cookies'. Count the number of nouns in this sentence.
Output: 5