apply filter to count