title: regex count in single match
body: <p>I want to check if string doesn't have more than 5 numbers.  I can do it this way:</p>
  
  <pre><code>Matcher matcher = Pattern.compile("\\d").matcher(val);
  i = 0;
  while (matcher.find()) {
      i++;
  }
  </code></pre>
  
  <p>However I would like to do it without while (because we are using regex validation framework).
  I want to be able to match strings like </p>
  
  <p><code>A2sad..3f,3,sdasad2..2</code></p>