Input: Sentence: 'A necktie around someone's neck but it is loosened'. Count the number of nouns in this sentence.
Output: 2