Input: Sentence: 'a couple of soldiers putting cheese on a pizza'. Count the number of nouns in this sentence.
Output: 4