public function makeUniqueNames($deliverySetList)
    {
        $result = array();
        $nameCounts = array();

        foreach ($deliverySetList as $deliverySet) {
            $deliverySetName = trim($deliverySet->oxdeliveryset__oxtitle->value);

            if (isset($nameCounts[$deliverySetName])) {
                $nameCounts[$deliverySetName] += 1;
            } else {
                $nameCounts[$deliverySetName] = 1;
            }

            $suffix = ($nameCounts[$deliverySetName] > 1) ? " (" . $nameCounts[$deliverySetName] . ")" : '';
            $result[$deliverySet->oxdeliveryset__oxid->value] = $deliverySetName . $suffix;
        }

        return $result;
    }