private int getNumInitializedBuckets() {
    Profile[] locProfiles = profiles; // grab current profiles
    int count = 0;
    for (Profile profile : locProfiles) {
      BucketProfile bucketProfile = (BucketProfile) profile;
      if (bucketProfile.isHosting) {
        count++;
      }
    }
    if (isHosting()) {
      count++;
    }
    return count;
  }
Get the number of members that are hosting the bucket, and have finished initialization.

This method is currently only used to check the bucket redundancy just before creating the
bucket. If it is used more frequently, it might be better to cache this count.
geode-core/src/main/java/org/apache/geode/internal/cache/BucketAdvisor.java