>>74
function CountAlpha(var str:    AnsiString):    Integer;
var
    i:    Integer;
    cnt:    Integer;
begin
    cnt:=0;
    i:=0;

    while (i <= Length(str)) do
    begin
        if ( (str[i] in LeadBytes)) then
        begin
            Inc(i,2);
        end
        else
        begin
            if (str[i] in ['a'..'z']) or (str[i] in ['A'..'Z']) then
            begin
                Inc(cnt);
            end;
            Inc(i);
        end;

    end;
    result:=cnt;
end;
//ここまで
よろしくお願いします