Added getCount method for class