Input: Sentence: 'Five cooks in hairnets work in a restaurant kitchen'. Count the number of nouns in this sentence.
Output: 4