Input: Sentence: 'a sub sandwich wrapped in some paper and cut in half'. Count the number of nouns in this sentence.
Output: 4