fix : xmemcnt -> count_bytes
fix str_to_reg: xmemcnt -> count_bytes