Add revised getCount method