Input: Sentence: 'A cut in half sandwich sitting on top of a table next to a foam container'. Count the number of nouns in this sentence.
Output: 6