docs: public int sum() {
          int total = 0;
          int N = getNumElements();
          for (int i = 0; i < N; i++) {
              if( data[i] )
                  total += 1;
          }
          return total;
      }