public int getLocatorCount() {
    if (cache != null) {
      return listLocators().length;
    }
    return 0;
  }
@return Total number of locators for this DS
geode-core/src/main/java/org/apache/geode/management/internal/beans/DistributedSystemBridge.java