The input string.
Optionalchar: stringOptional character to count.
Number of characters or character occurrences.
char is provided, only that character’s occurrences are counted.char is omitted, counts total characters in the string.\t)\n)
Counts characters in a string.