Write a function to count total characters in a string.
def count_charac(str1):
 total = 0
 for i in str1:
    total = total + 1
 return total
<s>[INST]<<SYS>>Given a task and its code, generate test cases for the code.<</SYS>>Write a function to count total characters in a string.
def count_charac(str1):
 total = 0
 for i in str1:
    total = total + 1
 return total[/INST]assert count_charac("python programming")==18
assert count_charac("language")==8
assert count_charac("words")==5</s>