public int countOfRegionServers() {
    // Presumes onlineServers is a concurrent map
    return this.onlineServers.size();
  }
Returns the count of active regionservers
hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java