public static int wordCount(String s) {
		s = StringDemo.allTrim(s);
		if (s.length() == 0) {
			return 0;
		}
		int count = 0;
		for (int i = 0; i < s.length(); i++) {
			if (i == (s.length() - 1)) {
				count++;
			}

			else if (s.charAt(i) == ' ') {
				if (s.charAt(i + 1) == ' ') {
					continue;
				}
				count++;
			}
		}
		return count;
	}