Input: Sentence: 'The long sandwich next to chips is cut into halves'. Count the number of nouns in this sentence.
Output: 3