Input: Sentence: 'Animals behind a fence stand beside palm trees'. Count the number of nouns in this sentence.
Output: 5