+
+ {# show active filters count if available via GET params #}
+ {% comment %} Compute active filters count (excluding 'page') using supported template tags {% endcomment %}
+ {% with request.GET|length as param_count %}
+ {% if param_count > 0 %}
+ {% if request.GET.page %}
+ {% with param_count|add:"-1" as active_count %}
+ {# active_count may be a string; only show badge when not zero #}
+ {% if active_count != "0" %}
+ {{ active_count }}
+ {% endif %}
+ {% endwith %}
+ {% else %}
+ {{ param_count }}
+ {% endif %}
+ {% endif %}
+ {% endwith %}
+