Waits for a collection to have a specific count.
public Task ForCountAsync<T>(Func<IEnumerable<T>> getCollection, int expectedCount, string? message = null)
Function to get the collection.
The expected count.
Optional message for timeout exception.