How to Update an If Rule Based on Different Parameters Passed to a Macro?
Why don't you pass an array as a parameter?

{% macro mobileNav([
    {url: '/1', title: 'Foo'},
    {url: '/2', title: 'Bar'},
    {url: '/3', title: 'FooBar'},
], {} ) %}


And in your macro..

{% for item in items %}
    {% if item.title is defined and item.title is not empty and item.url is defined and item.title is not empty %}
         // ... output something
         &lt;a href="{{ item.url }}"&gt;{{ item.title }}&lt;/a&gt;
         {{ items|length &lt;= 3? 'less than 4' : 'more than 3 are passed' }}
    {% endif %}
{% endfor %}