public static void main(String[] args) {
		File f = new File("files/readme.txt");
		BufferedReader reader = null;
		BufferedWriter out = null;
		int recuento = 0;
		try {
			reader = new BufferedReader(new InputStreamReader(
					new FileInputStream(f)));
			String line = reader.readLine();
			while (line != null) {
				recuento = recuento + line.length();
				line = reader.readLine();
			}
			System.out.println("Voy a guardar el valor " + recuento);

			out = new BufferedWriter(new FileWriter("files/registro.txt", true));

			Date fecha = new Date();
			DateFormat hourdateFormat = new SimpleDateFormat(
					"HH:mm:ss dd/MM/yyyy");
			out.write("\n" + hourdateFormat.format(fecha) + " " + recuento);

		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} finally {
			try {
				if (reader != null)
					reader.close();
				if (out != null)
					out.close();
			} catch (IOException e) {
			}
		}
	}