fixing total_purchases count on heroku