Count unique records in Rails 4

See: https://github.com/charlotte-ruby/impressionist/issues/105

I couldn't get the dependencies to install correctly so I was not able to run or add any tests...