So... In what way does this task differ significantly from String length? Other than being horribly under specified?
In the modern world, string "length" is pretty much a useless measurement, especially in the absence of a specified encoding; hence Raku not even having an operator: "length" for strings.