Input: Sentence: 'A cat is resting its head on a notepad'. Count the number of nouns in this sentence.
Output: 3