add filter infrastructure; allow using filter for inter/COUNT