Count UTF-8 characters by counting non-continuation bytes.
A continuation byte has the bit pattern 10xxxxxx (0x80..0xBF).
Every other byte starts a new character (ASCII, multi-byte leader, or invalid).
Count lines and words using optimized strategies per locale.
UTF-8: fused single-pass for lines+words to avoid extra data traversal.
C locale: single scalar pass with 3-state logic.
Count lines + words + bytes in a single fused pass (the default wc mode).
Avoids separate passes entirely — combines newline counting with word detection.