Input: Sentence: 'A person holds a sandwich on tin foil'. Count the number of nouns in this sentence.
Output: 4