Added get count function