Input: Sentence: 'A picture of a picture of a man wearing a tie'. Count the number of nouns in this sentence.
Output: 4