Write a Python program to count the number of characters in a string.
String = "Hello World"
String = "Hello World"

def count_characters(str):
  return len(str)

print("Number of characters in the string:", count_characters(String))