bug-dataset-not-filtered-by-datasetId - corrected algo and fixed counts for datasets