Код
const
  n = 50; { размер линейной таблицы }
var
  table: array[1 .. n] of integer; { сама таблица }
  was: array[1 .. n] of integer; { доп. массив }
  i, j, current, count: integer;
  found: boolean;
begin
  { ввод таблицы }
  ...
  { подсчет }
  for i := 1 to n do
    begin
      found := false;
      for j := 1 to current do
        found := found or (was[j] = table[i]);
      if not found then
         begin
            inc(current); was[current] := table[i];
         end
    end;
  writeln('количество различных чисел = ', current)
end.
Набирал без проверки, прямо сюда, так что могут быть ошибки...
P.S. Если числа ограничены 0 - 255, можно использовать множества - будет работать быстрее