public int getRunningInstanceCount() {
        List<KeyValueEntity> result = this.store.findAll(store.getUniqueKey());
        int count = 0;
        for (KeyValueEntity entity : result) {
            if (entity.getAsInstanceProfile().getState() == InstanceStateEnum.DEFAULT) {
                count++;
            }
        }
        return count;
    }
list all instance from instance store.

@return list of task
inlong-agent/agent-common/src/main/java/org/apache/inlong/agent/store/InstanceStore.java