Just limit it to 8 bytes at which point you always do 'know the number of follow on bytes' from the first byte.
Nobody needs more than 4.47 trillion characters. (famous last words)
Nobody needs more than 4.47 trillion characters. (famous last words)
There cannot be 4 trillion characters because humans would need to know all of them and humans cannot know that many things.