Album has_many photos, listing albums with the most photos first
Forum has_many posts, listing forums with the most posts first
Group has_many users, listing groups with the most users first
...and you want to show these parents ordered by the number of children objects they have you need to do this...
Album.find(:all).sort { |x,y| x.photos.size <=> y.photos.size }
Obviously you can use named_scopes and conditions to restrict it down if you don't want all of a certain object, either child or parent.
Hopefully this helps someone out.
