speed up the counts extraction in CCFGS