Input: Sentence: 'A sandwich cut in half on a tray on a table'. Count the number of nouns in this sentence.
Output: 4