Finished getCount method