{% for c in clients %}
{% set client_type = (c.client_type or '') %}
{% set is_domestic = (client_type|lower == 'domestic') %}
{% set branches_count = (c.branches.count() if c.branches is defined else 0) %}
{% set docs_count = (c.documents.count() if c.documents is defined else 0) %}