docs: public static int getNumberOfColumnsInFile(String filename, String delimiter) {
      try {
        BufferedReader in = new BufferedReader(new FileReader(filename));
        String line;
        while ((line = in.readLine()) != null) {
          String[] parts = line.split(delimiter);
          in.close();
          return parts.length;
        }
        in.close();
        // File is empty.
        return 0;
      } catch (IOException e) {
        throw new RuntimeException(e);
      }
    }