Do partitioning based on counters.