Input: Sentence: 'View of a kitchen with man and dog inside of it'. Count the number of nouns in this sentence.
Output: 4