Why do I think this is home work ?
In any case I would use a TStringList, load it, sort it using the features of the TStringList and maybe even use the object of each as a counter.
In a sense, it's homework, but it's for me. I'm not a programmer by education, just a hobby. In life I am Bob the Builder

. I like to write something in my spare time, probably only to prove myself. I am interested in the CREDO project, I use their data. This time I want to juxtapose them with the detection of global earthquakes, I wonder if it has any connection, although nobody writes about it

.
Here are some tools for the CREDO project
https://github.com/credo-science/Windows-ToolsAnd the CREDO project itself here:
https://credo.science/Yes, I started, but I do not know how to count duplicates and how to do an array with the results. I have so much code for now. Good start?
procedure TForm1.Button1Click(Sender: TObject);
const
BLOCK_SIZE = 10000;
var
f: textfile;
Times: TStringList;
det, separator: string;
i: integer;
begin
czas := TStringList.Create;
czas.Duplicates := dupIgnore;
czas.Sorted := True;
AssignFile(f, 'Base_total.txt');
reset(f);
SetLength(det, 0);
FillChar(det, SizeOf(det), 0);
while not EOF(f) do
begin
if i mod BLOCK_SIZE = 0 then
SetLength(det, Length(det) + BLOCK_SIZE);
readln(f, det);
czas.Add(det);
readln(f, separator);
Inc(i);
end;
closefile(f);
end;