Input: Sentence: 'A glass bottle used as a vase for twigs'. Count the number of nouns in this sentence.
Output: 4