function ColNum(var str: string): integer;
var
count, len, i: integer;
nums: set of char;
begin
count:=0;
nums:=['0'..'9'];
len:=length(str);
for i:=1 to len do
begin
if ( str[i] in nums ) then
inc(count)
end;
ColNum:=count;
end;