Input: Sentence: 'A photo take though glass of a polar pear diving under water'. Count the number of nouns in this sentence.
Output: 5