Instructions: In this task, you need to count the number of nouns/verbs in the given sentence.
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