code: public int size() {
          int n = 0;
          int count = getRangeCount();
          for (int i = 0; i < count; ++i) {
              n += getRangeEnd(i) - getRangeStart(i) + 1;
          }
          return n + strings.size();
      }
docs: Returns the number of elements in this set (its cardinality)
  Note than the elements of a set may include both individual
  codepoints and strings.
  
  @return the number of elements in this set (its cardinality).