The .count getter on string returns the number of code points. That's O(n), but it's consistent with the rest of the main string API. If you want the number of bytes, it's "string".bytes.count. Updated the docs. Fixes 68. Woo!