Refactor the tests for `labels_frequency` and `labels_count` so that they follow the Given / When / Then pattern