public static void count_words(String s) {

        boolean wordStarted = false;
        int wCount = 0;
        for (int i = 0; i < s.length(); i++) {
            char ch = s.charAt(i);
            boolean letter = ch != ' ' && ch != ',';
            if (letter) {
                wordStarted = true;
            } else {
                if (wordStarted) {
                    wCount++;
                }
                wordStarted = false;

            }
        }

        System.out.println(wCount);
    }