final efforts to speed up filtered match counting