1. JAVA, Till Fischer

/*
============================================================================
Name : Main.java
Author : Till Fischer
Description : 494 - Kindergarten Counting Game
Accepted : Accepted
Time : 0.100
============================================================================
*/

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;


public class Main {

public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(System.out));
String line;
String[] tokens;
int words;
int i;

while(reader.ready()) {
if((line = reader.readLine()) == null) {
break;
}
tokens = line.split("[^A-Za-z]+");
for(words = 0, i = 0; i < tokens.length; i++,words++) {
if(tokens[i].equals(""))
words--;
}
writer.append(words + "\n");
}
writer.flush();
writer.close();
reader.close();
}

}