refactor common code into displayMeowCount method