@Override
    public boolean equals(Object o) {

        if (this == o) {
            return true;
        }
        if (!(o instanceof CountStateElement)) {
            return false;
        }

        CountStateElement that = (CountStateElement) o;

        if (maxCount != that.maxCount) {
            return false;
        }
        if (minCount != that.minCount) {
            return false;
        }
        if (streamStateElement != null ? !streamStateElement.equals(that.streamStateElement) : that
                .streamStateElement != null) {
            return false;
        }
        return true;
    }
Count state element used in patterns
modules/siddhi-query-api/src/main/java/io/siddhi/query/api/execution/query/input/state/CountStateElement.java