Printing out the count of media files

Hey there everybody. In one of my template partials, i want to print out (html) a list of files. That already works well for all the zip files i add to the post / pages folder. But i would love to have the count of the attached files showing in the header - wich i tried with .length and .count. But neither one gives me any output. What am i doing wrong?

{% set attachementList = %}
{% set attachementCount = attachementList.length() %}
{% if attachementList %}
<h3>{{ attachementCount }} Anhänge (Downloads)</h3>
{% for mediaItem in %}
<li><a href="{{mediaItem.url}}">{{mediaItem.text}}</a></li>
{% endfor %}
{% endif %}

Use attachementList|length, see the Twig doc

Works perfect! Thank you.
(And now i get how those “filters” work.)