Input: Sentence: 'A green rock lays next to other rocks'. Count the number of nouns in this sentence.
Output: 2