code: static int sizeImpl(Multiset<?> multiset) {
      long size = 0;
      for (Entry<?> entry : multiset.entrySet()) {
        size += entry.getCount();
      }
      return Ints.saturatedCast(size);
    }
docs: An implementation of {@link Multiset#size}.