Input: Sentence: 'A lonely piece of chocolate cake on a white plate with a black rim'. Count the number of nouns in this sentence.
Output: 5