def counter(self, counter_name, default=0):
    return self.shard_context.counter(counter_name, default)
See shard_context.count.
dataset/ETHPy150Open GoogleCloudPlatform/appengine-mapreduce/python/src/mapreduce/map_job_context.py/SliceContext.counter