public static int getCount ( Matcher matcher ) { int counter = 0 ; matcher . reset ( ) ; while ( matcher . find ( ) ) { counter ++ ; } return counter ; }
Find the number of Strings matched to the given Matcher .