fix count result after filtering