handle partitions in ESCountTask