Make the sampling count accurate and speed up the updateStatistics