@Override
        public void restore(Map<String, Object> state) {
            set = (Set) state.get("Set");
            counter = (Map) state.get("Counter");
        }
This map aggregates the count per each distinct element
modules/siddhi-core/src/main/java/io/siddhi/core/query/selector/attribute/aggregator/UnionSetAttributeAggregatorExecutor.java