code: public int count() {
          int n = 0;
          for (ConcurrentMap<?, ?> bag : registry.values()) {
              n += bag.size();
          }
          return n;
      }
docs: Returns the connection count in this registry.
  
  Note it might count connections that are closed but not removed from registry yet
  
  @return the connection count