code: public static int count(final Iterable<Range<Long>> ranges) {
          int count = 0;
          for (Range<Long> range : ranges) {
              checkClosedOpen(range);
              count++;
          }
          return count;
      }
docs: Return the count of the specified ranges.
  
  @param ranges ranges, must not be null, must not contain any null ranges, and all ranges must be [closed, open)
  @return the count of the specified ranges