Counting total bytes of characters to be distinguished between single and multi bytes

