Input: Sentence: 'a cat is laying on the floor next to a wood leg'. Count the number of nouns in this sentence.
Output: 4