I need to count the occurrences of a specific character in a file, the definition of the function to perform the search is as follows: