Input: Sentence: 'A corner rack with ties tied on both sides'. Count the number of nouns in this sentence.
Output: 4