The easiest way to determine the character count of a UTF8 string is to pass the text through utf8_decode() first:
$length = strlen(utf8_decode($s));
utf8_decode() converts characters that are not in ISO-8859-1 to ‘?‘, which, for the purpose of counting, is quite alright.
脑袋稍微变通一下就应该能想到的。