Mark std.string.countchars as @safe and pure