added GetCountByDate and GetRateCounts APIs