code: public long getRecordCount(Collection<Path> paths) {
      long count = 0;
      for (Path path : paths) {
        count += getRecordCount(path);
      }
      return count;
    }
docs: Get record count for a list of paths.