code: protected long getNumConnections(IPeer peer) {
      if (peer == null) {
        return 0;
      }
      IStatistic stats = peer.getStatistic();
  
      // If no statistics are available, return zero
      if (!stats.isEnabled()) {
        if (logger.isDebugEnabled()) {
          logger.debug("Statistics for peer are disabled. Please enable statistics in client config");
        }
        return 0;
      }
  
      // Requests per second initiated by Local Peer + Request initiated by Remote peer
      String uri = peer.getUri() == null ? "local" : peer.getUri().toString();
      long requests = getRecord(IStatisticRecord.Counters.AppGenRequestPerSecond.name()+'.'+uri, stats)
          + getRecord(IStatisticRecord.Counters.NetGenRequestPerSecond.name()+'.'+uri, stats);
  
      // There are likely more requests than responses active
      long connections = Math.max(0, requests);
  
      if (logger.isTraceEnabled()) {
        logger.trace("Active connections for {}: {}", peer, connections);
      }
  
      return connections;
    }
docs: Since num connections is not available, determine throughput by reading statistics
  and assume the load of the peer
  
  @param peer
  @return throughput indicator