angularjs - Pre-count filtered results in an ng-repeat -


i have long list of products displayed using ng-repeat , i'm creating filter on left pare down list in main content well.

i have requirement pre-count results of each possible filter such text of link of filter button show results receive if turn filter on, happens in e-commerce site.

i'm wondering how angularjs. i'm hoping there's easier way other creating custom filter on scope each possible filter.

note don't have worry chaining filter values- results of selecting 1 filter.

thanks, scott

not knowing data model looks can't if need custom filter. simple data model should able use simple filter so: <ul> <li ng-repeat="item in items"> <a ng-click="filter(item.type)">{{item.name}} {{(alldata | filter:item.type).length}}</a> </li> </ul>

here working example http://codepen.io/mkl/pen/gqpqyn