code: public static int countPuncs(String str) {
  		int count = 0;
  	    
  		for (int i = 0; i < str.length(); i++) {
  		    if (str.charAt(i) == '.' || str.charAt(i) == '?' || str.charAt(i) == '!' ||
  				str.charAt(i) == ',' || str.charAt(i) == ':' || str.charAt(i) == ';') {
  			count++;
  		    }
  		}
  		
  		return count;
      }
docs: Count signs.
  
  @param str string
  @return the number of punctuation marks in this token