Use core.reducers to reduce counters for fn trace