code: public static <T> boolean xMatch(final Stream<T> stream, final int num, final Predicate<? super T> c) {
  
          return stream.filter(t -> c.test(t))
                       .collect(java.util.stream.Collectors.counting()) == num;
      }
docs: Check that there are specified number of matches of predicate in the Stream
  
  <pre>
  {@code
  assertTrue(Streams.xMatch(Stream.of(1,2,3,5,6,7),3, i->i>4));
  }
  </pre>