テキストボックスの文字の総数を確認し、その値をラベルに表示する必要がありますが、すべての空白を除外する必要があります。
コードは次のとおりです。
var
sLength : string;
i : integer;
begin
sLength := edtTheText.Text;
slength:= ' ';
i := length(sLength);
//display the length of the string
lblLength.Caption := 'The string is ' + IntToStr(i) + ' characters long';