Hey JM,
What about something like this?
Count Characters of Partial String.kmmacros (4.0 KB)
You can cut down on the variables used, but I've intentionally done this step-by-step to make what I'm doing as clear as possible.
NOTE: Keyboard Maestro's Filter Variable action performs the given filter ON the given variable. (Users often expect filter someVariable to anotherVariable, but that's not now it works.)
As JM mentions this task is very straightforward in AppleScript:
tell application "Keyboard Maestro Engine" to set testSel to getvariable "testSel"
set subStringLength to offset of ";" in testSel
-Chris