Write a program to count the characters of each word in a given sentence str. Display the frequency of the search word.

Write a program to count the characters of each word in a given sentence str. increment count by 1.