public count() as Long:
Counts result rows through the provider count operation.
Exact result count.
total = query.count()