Input: Sentence: 'a pan of pizza on a table with a person and a dog near by'. Count the number of nouns in this sentence.
Output: 5