@TCNTRL[string]: Returns the number of ASCII control characters (0x00 - 0x1F or 0x7F) in string.
See also: @TALNUM, @TALPHA, @TASCII, @TDIGIT, @TLOWER, @TPRINT, @TPUNCT, @TSPACE, @TUPPER, and @TXDIGIT.
Examples:
echo %@tcntrl[abc]
0
set var=^r^n
echo %@tcntrl[%var]
2