Input: Sentence: 'A sidewalk lined with lush green foliage and homes'. Count the number of nouns in this sentence.
Output: 3