var
s:string;
count,i:integer;
begin
readln(s);
for i:= 1 to length(s) do
if s[i] = ',' then
inc(count);
writeln('kol-vo , = ',count);
end.
Вариант 2
function CountSym(ch: char; s: string): byte;
begin
if Pos(ch, s) <> 0 then
CountSym := 1 + CountSym(ch, Copy(s, Pos(ch,s)+1, Length(s)))
end;
var
s:string;
count:byte;
begin
readln(s);
count:=CountSym(',',s);
writeln('kol-vo , = ',count);
end.