code: public long numElements() {
          long ret = 0;
          for (SDVariable variable : variables()) {
              long[] shape = variable.getShape();
              if(shape != null) {
                  ret += ArrayUtil.prod(shape);
              }
          }
          return ret;
      }
docs: Count the number of elements in all arrays, according to {@link SDVariable#getShape()}
  @return Number of array elements for all variables