Added methods to get filtered record counts