module SubjectCounts
  include ActiveSupport::Concern

  def subject_count
    subject_sets.map{|set| set.set_member_subjects_count}.reduce(&:+)
  end
end

module SubjectCounts
  include ActiveSupport::Concern

  def subject_count
    subject_sets.sum :set_member_subjects_count
  end
end

Use model sum to prevent having to load entire record
Use model sum to prevent having to load entire record
