code: public static long pop_intersect(long[] arr1, long[] arr2, int wordOffset, int numWords) {
      long popCount = 0;
      for (int i = wordOffset, end = wordOffset + numWords; i < end; ++i) {
        popCount += Long.bitCount(arr1[i] & arr2[i]);
      }
      return popCount;
    }
docs: Returns the popcount or cardinality of the two sets after an intersection.
  Neither array is modified.