const
n = 10;
var
A: array[1..n] of integer;
i, max, s: integer;
begin
readln(A[1]);
max := A[1];
s := 1;
for i := 2 to n do
begin
readln(A);
if A > max then
begin
max := A;
s := 1;
end
else if A = max then s += 1;
end;
writeln(s);
end. Или так: begin
var ar := ReadArrInteger(10);
ar.CountOf(ar.Max).Println
end.