fix for total_count active record Rails 4