Input: Sentence: 'A bench sitting in front of a wall and next to a door'. Count the number of nouns in this sentence.
Output: 4