setting count when calling getPage for the first time