Enum.count_until/3

defmodule Enum do
  def count_until(enumerable, fun, limit)
end

Counts how many elements are evaluated to truthy when fun is applied over them, stopping at limit.

If enumerable is traversed completely then the function returns the count of elements that are evaluated to truthy when fun is applied over them.