code: public int getNumberOfResults()
      {
          final String numberOfResults = agiReply.getAttribute("results");
          return numberOfResults == null ? 0 : Integer.parseInt(numberOfResults);
      }
docs: Returns how many results have been recoginized. Usually there is only one result but if multiple rules in
  the grammar match multiple results may be returned.
  
  @return the number of results recognized.