Input: Sentence: 'an apple phone and some other type of machine'. Count the number of nouns in this sentence.
Output: 4