bucketed map/reduceish counter and exp code