title: How can one obtain a row count from has_many :through relations with :uniq => true
body: <p>This is my model:</p>
  
  <pre><code>class Tag &lt; ActiveRecord::Base
    # id, name
    has_many :taggings
  end
  
  class Tagging &lt; ActiveRecord::Base
    # id, tag_id, owner_id, target_type, target_id
    belongs_to :tag
    belongs_to :owner, :class_name =&gt; 'User'
    belongs_to :target, :polymorphic =&gt; true
    validates_uniqueness_of :tag_id, :scope =&gt; [ :target_id, :target_type, :owner_id ]
  end
  
  class Asset &lt; ActiveRecord::Base
    # id, owner_id, title, type, etc
    belongs_to :owner, :class_name =&gt; 'User'
    has_many :taggings, :as =&gt; :target
    has_many :taggers, :through =&gt; :taggings, :source =&gt; :owner, :uniq =&gt; true
    has_many :tags, :through =&gt; :taggings, :uniq =&gt; true
  end
  
  class User &lt; ActiveRecord::Base
    # id, name, email, etc
    has_many :assets, :foreign_key =&gt; 'owner_id'
    has_many :my_taggings, :class_name =&gt; 'Tagging', :foreign_key =&gt; 'owner_id'
    has_many :my_tags, :through =&gt; :my_taggings, :source =&gt; :tag, :uniq =&gt; true
    has_many :taggings, :as =&gt; :target
    has_many :taggers, :through =&gt; :taggings, :source =&gt; :owner, :uniq =&gt; true
    has_many :tags, :through =&gt; :taggings, :uniq =&gt; true
  end
  </code></pre>
  
  <p>All of the relations are working but I have an additional requirement that I can't find the solution for:</p>
  
  <p>consider this relation in the Asset class</p>
  
  <pre><code>has_many :tags, :through =&gt; :taggings, :uniq =&gt; true
  </code></pre>
  
  <p>calling Asset.find( :first ).tags returns an array of Tags as expected but I need for each Tag to contain a count attribute indicating how many times the row would have appeared if :uniq => true was not specified.</p>
  
  <p>eg. more than one User could apply the same Tag to an Asset. I'd like to display the tag name plus the number of users that applied it.</p>