function CountUniqueItems(Items: TStrings): Integer;
var
List: TStringList;
begin
List := TStringList.Create;
List.Duplicates := dupIgnore;
List.Sorted := True;
List.AddStrings(Items);
Result := List.Count;
List.Free;
end;
begin
...
c := CountUniqueItems(items);
...
end.
function CountUniqueItems(Items: TStrings): Integer;
var
List: TStringList;
begin
List := TStringList.Create;
List.Duplicates := dupIgnore;
List.Sorted := True;
List.AddStrings(Items);
Result := List.Count;
List.Free;
end;
begin
...
c := CountUniqueItems(items);
...
end.