docs: public long countNNZ() {
          long count = 0;
  
          for (int i = 0; i < values.length(); i++) {
              int[] idx = getUnderlyingIndicesOf(i).asInt();
              boolean isIn = true;
              int idxNotFixed = 0;
              for (int dim = 0; dim < idx.length; dim++) {
  
                  if (flags()[dim] == 1) {
                      if (sparseOffsets()[dim] != idx[dim]) {
                          isIn = false;
                          break;
                      }
                  } else {
                      int lowerBound = sparseOffsets()[dim];
                      long upperBound = sparseOffsets()[dim] + shape()[idxNotFixed];
                      if (!(idx[dim] >= lowerBound && idx[dim] < upperBound)) {
                          isIn = false;
                          break;
                      }
                      idxNotFixed++;
                  }
              }
              count = isIn ? count + 1 : count;
          }
          return count;
      }