[java] how to count the spaces in a java string?