```ruby
module SubjectCounts
  include ActiveSupport::Concern

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

Use model sum to prevent having to load entire record
user
```ruby
module SubjectCounts
  include ActiveSupport::Concern

  def subject_count
    subject_sets.sum :set_member_subjects_count
  end
end
```
assistant