Input: Sentence: 'A plate of food cut into slices has onions and olives on it'. Count the number of nouns in this sentence.
Output: 5