Input: Sentence: 'a sandwich cut in half and a cup of coffee'. Count the number of nouns in this sentence.
Output: 4