@Override
  public int getRoleCount(Role role) {
    return localAddress.getRoles().contains(role) ? 1 : 0;
  }
Returns count of members filling the specified role
geode-core/src/main/java/org/apache/geode/distributed/internal/LonerDistributionManager.java