Suggested by @tomasherceg in #1852 (comment).
We use hacks to call CountAsync, since that isn't available on IAsyncEnumerable. We need to try to resolve the Marten's CountAsync method using reflection, and decide to use it based on the IQueryable type.