{% if count != 0 %}
    <span title="{{ title }}" class="badge text-bg-{{ bg_class }}">{{ count }}</span>
{% else %}
    <span title="{{ title }}" class="badge text-bg-secondary">{{ count }}</span>
{% endif %}
