Fix total_count to work for Rails 4 (Ruby 2)

... 4, for total_count