Enhance performance for QueryBuilder subscriber

This is a quick enhancement that removes the "order by" part of the query for counting total number of rows, which can lead to huge performance improvements for some queries.

Unfortunately this only works for the query builder subscriber as it is not easy to remove the "order by" part for a query.

This is my first PR on this project, so if you prefer that I do it in a different way, feel free to ask me to!

I didn't add any unit test on this as this is not a new feature.