code: public static int countStops(String str) {
  		int count = 0;
  	    
  		for (int i = 0; i < str.length(); i++) {
  		    if (str.charAt(i) == '.' || str.charAt(i) == '?' || str.charAt(i) == '!') {
  			count++;
  		    }
  		}
  		
  		return count;
      }
docs: Count stops.
  
  @param str string
  @return how many stops '.' str contains