feat(counting): implement mem-based counters