Imagine a jukebox application containing tracks, artists and albums;
tracks belong to albums and artists, an artist has many tracks and an
album has many tracks. To get the artists which play on an album you
could add the following to album: "has_many :artists, :through
=> :tracks, :group_by => 'artist.id'". The count method stopped
working properly in this construct since rails 2.
A workaround for this problem would be to use the :uniq option but
this simply uses uniq! after querying, instead of having the database
reduce the amount of results.