Use 'total' more consistently (instead of count_star, etc.)