Report question

Question: Rails 3 query on condition of an association's count