{% set lim = count or 10 %}
{% set a = articles | selectattr(key, 'in', values) | list %} 
<div class='cards'>
{% for article in a[:lim] %}
    <div class='card curled'>
        <article class="hentry">
            <header> <h2 class="entry-title"><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></h2> </header>
            <div class="entry-content"> {{ article.summary }} </div><!-- entry-content -->
        </article>
    </div>
{% endfor %}
</div>
