public static int cuentaTokenizer(FileReader fr, BufferedReader br) throws IOException { String linea; int numpalabras = 0; //linea = br.readLine(); while ((linea = br.readLine()) != null) { StringTokenizer st = new StringTokenizer(linea); while (st.hasMoreTokens()) { linea = st.nextToken(); System.out.println(linea); numpalabras++; } } return numpalabras; }