Possible to sort by count of Aggregate field?

Currently, this is not possible.

The current way to do this would be to fetch all contacts along with hasTasksAggregate and then sort results of the query from the app.