Fix Rails 4.1 count in active_record.rb