Input: Sentence: 'A couple of cats are playing on a rug'. Count the number of nouns in this sentence.
Output: 3