Input: Sentence: 'A toy car is sitting on top of a bed'. Count the number of nouns in this sentence.
Output: 4