code: public void called(Matcher<Integer> numberOfCalls) {
          Rule rule = ruleBuilder.toRule();
          int matchingCalls = (int)requests.stream()
                  .filter(req -> rule.matches(req))
                  .count();
  
          if (!numberOfCalls.matches(matchingCalls)) {
              throw new IllegalStateException(String.format("Expected %s calls, but found %s.", numberOfCalls, matchingCalls));
          }
      }
docs: Verifies number of request matching defined conditions.
  
  @param numberOfCalls expected number of calls