Цикл в цикле ваша тема:
program pin;
var
i, j, cm: Integer;
povtor: Boolean;
const
m: array[1..10] of Integer = (1, 2, 3, 1, 2, 5, 4, 3, 1, 2);
begin
cm := 0;
for i := 1 to 10 do
begin
povtor := False;
for j := 1 to 10 do
begin
if (i <> j) and (m[ i ] = m[ j ]) then
begin
povtor := True;
Break;
end;
end;
if not povtor then cm := cm + 1;
end;
WriteLn(cm);
end.