Look at adding a "counter cache" column to your User model to store
the amount of tickets associated to them. Then you can just use that
column to sort by in a normal find.
http://rails.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html