Input: Sentence: 'A cat with a serious look on its face sitting on a bed'. Count the number of nouns in this sentence.
Output: 4