Different approach to counting UTF-8 string length