see on GitHub

Getting Query statistics

Provide statistics about the query, such as total count of matching records:

FilesQueryStatistics stats;

List<FileHeader> results = await session.Query()
                            .OrderBy(x => x.Name).Statistics(out stats)
                            .ToListAsync();

Out parameters
stats FilesQueryStatistics Statistics about the files query