public int getPrimaryCount() {
    int primaryCount = 0;
    for (Bucket bucket : getBuckets()) {
      if (equals(bucket.getPrimary())) {
        primaryCount++;
      }
    }
    return primaryCount;
  }
@param sourceMember the member we will be moving this bucket off of
@param checkZone true if we should not put two copies of a bucket on two nodes with the same
       IP address.
geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/rebalance/model/Member.java