public static int fastApproximateWordCount(String string){
  Matcher m=PATTERN.matcher(string);
  int count=1;
  while (m.find()) {
    count++;
  }
  return count;
}

public static int fastApproximateWordCount ( String string ) { Matcher m = PATTERN . matcher ( string ) ; int count = 1 ; while ( m . find ( ) ) { count ++ ; } return count ; }
returns an approximate number of words based on number of whitespace blocks .
