Input: Sentence: 'A cardboard box carrying various vegetables and fruits'. Count the number of nouns in this sentence.
Output: 4