fix counting of filtered