That error message implies you have a column in users called kits_count, possibly maintained by a callback. If so you could more easily just:
scope :top5_users,
order("kits_count DESC").
limit(5)
If not ...
Support for column aliases is mixed among RDBMS vendors, and you could probably use:
order("count(kits.id) desc")
If you knew the column number you could:
scope :top5_users,
joins(:kits).
select("count(kits.id) AS kits_count, users.*").
group("users.id").
order("1 DESC").
limit(5)
Take the kits.id out of the group by or you'll get 1 for every count.