public long cardinality() {
    long bitCount = 0L;
    for (int i = getPageCount(); i-- > 0; ) {
      bitCount += BitUtil.pop_array(bits[i], 0, wlen);
    }

    return bitCount;
  }
@return the number of set bits
ambry-utils/src/main/java/com/github/ambry/utils/OpenBitSet.java