TYPO3 fluid: count filtered iterations
<p>I know it's not recommended practice, data filtering is supposed to be done in the <strike>controller</strike> repository. But this happens to me quite often:</p>

<p>You have a list of data and want to display it regarding some criteria (in the example, <code>plugin.myext.settings.year = 2015</code>):</p>

<pre><code>&lt;f:for each="{events}" as="event"&gt;
  &lt;f:if condition="{f:format.date(date: event.date, format: 'Y')}=={settings.year}"&gt;
  {event.name}
  &lt;/f:if&gt;
&lt;/f:for&gt;
</code></pre>

<p>This is a nice and simple way to get all events from 2015.</p>

<p>BUT how to count those ad-hoc-filtered events? 
To output something like: <strong>123 Events in 2015</strong>.</p>

<p><code>&lt;f:count&gt;{events}&lt;/f:count&gt;</code> won't respect the condition. Is it possible to keep some counter running, to at least be able to output the number of hits at the bottom? Or no way at all (except a custom viewhelper)? </p>