code: public static <T extends Elements> Predicate<T> forSize(final int size) {
          return new Predicate<T>() {
              @Override
              public boolean apply(T input) {
                  return input.as(BasicElements.class).size() == size;
              }
  
              @Override
              public String toString() {
                  return String.format("forSize(%d)", size);
              }
          };
      }
docs: Predicate to use with {@link WaitWebElements#wait(Predicate)} methods which ensures that
  evaluation will only be successful when this instance has a specific size.
  
  @param <T> the generic type
  @param size number of matched {@link WebElement} instances
  @return predicate that returns true if it has the exact size