Input: Sentence: 'A statue of a man on horseback at night'. Count the number of nouns in this sentence.
Output: 4