total and group-wise badge count
support no count_per_group