private int countColumnsInFile() throws IOException {
		this.resetReader();
		log.trace("Counting columns in input file...");
		int count = 0;
		try {
			String line = this.readLine();
			while (line.isEmpty() && this.skipEmptyLines || !checkLine(line))
				line = this.readLine();
			int pos = 0;
			while ((pos = line.indexOf(this.inSplit, pos)) > -1) {
				count++;
				pos++;
			}
		} catch (final IOException e) {
			e.printStackTrace();
		}
		// if we found the splitstring at least ones, we have at least two
		// columns
		if (count > 0)
			count++;
		this.columnsInFile = count;
		log.trace("File contains " + this.columnsInFile + " columns");
		return this.columnsInFile;
	}