import java.io.File;
import java.io.IOException;
import java.util.Scanner;

public class WordCountTextRunner {

	public static void main(String args[]) {
		try {
			File inputFile = new File("content.txt");
			Scanner input = new Scanner(inputFile);
			int count = 0;
			String[] words = null;
			while (input.hasNext()) {
				String line = input.nextLine();
				words = line.split(" ");
				count = words.length;
				System.out.println("  Word count: " + count + " Line is: " + line);
			}
			input.close();
		} catch (IOException e) {
			System.out.println("File not found: " + e.getMessage());
		}

	}
}
