check for Hash in addition to OrderedHash, which seems to break in Rails 4, for total_count
Merge pull request #369 from aew/master

Fix total_count to work for Rails 4 (Ruby 2)