Add counting of filtered records