use buffer to accelerate the merging of Counter type in SelectFeatures