code: public synchronized int getNumStartedChainsUsingChannel(String channelName) {
          int numStartedChains = 0;
          ChannelContainer channelContainer = this.channelRunningMap.get(channelName);
          if (null != channelContainer) {
              for (Chain chain : channelContainer.getChainMap().values()) {
                  if (chain.getState() == RuntimeState.STARTED) {
                      numStartedChains++;
                  }
              }
          }
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
              Tr.debug(tc, "getNumStartedChainsUsingChannel: " + channelName + "=" + numStartedChains);
          }
          return numStartedChains;
      }
docs: Get the number of chains that are currently using this channel in the
  runtime
  which are in the STARTED state.
  
  @param channelName
  @return number of chains in STARTED state