How to get length of returned from filter array?
<p>I have custom filter in ng-repeat.
I need to find out length of returned array.How to do it?
here is html:</p>

<pre><code> &lt;div  ng-repeat="item in vm.work_items | itemsInFolder: search"&gt;
      &lt;div&gt;item.name&lt;/div&gt;
 &lt;/div&gt;
 &lt;div&gt;{{returnedArray.length}}&lt;/div&gt; //I need set returned value here.
</code></pre>

<p>filter:</p>

<pre><code> .filter('itemsInFolder', function($window, NamesService) {
        return function (items, input) {
            if(!input) {
                return items;
            } else {
            var out = [];
            items.forEach(function(item){
             //here goes some custom logic, which returns array;
             out.push(item);
               }
          return out;
        }
  });
</code></pre>