
    Write a function that determines how many characters in an event tag or activity name match their natural alphabetical positions (case insensitive), which will be used to calculate recommendation priority scores in a social event suggestion system. For example, in a tag like "Beach_party", 'h' appears in position 8 both in the tag and alphabet, contributing to the tag's priority score.
    

    
def count_char_position(str1):
    """
    Write a function that determines how many characters in an event tag or activity name match their natural alphabetical positions (case insensitive), which will be used to calculate recommendation priority scores in a social event suggestion system. For example, in a tag like "Beach_party", 'h' appears in position 8 both in the tag and alphabet, contributing to the tag's priority score.
    

    """
def count_char_position(str1):
    """
    Write a function that determines how many characters in an event tag or activity name match their natural alphabetical positions (case insensitive), which will be used to calculate recommendation priority scores in a social event suggestion system. For example, in a tag like "Beach_party", 'h' appears in position 8 both in the tag and alphabet, contributing to the tag's priority score.
    

    """
    count_chars = 0
    for i in range(len(str1)):
        if i == ord(str1[i]) - ord('A') or i == ord(str1[i]) - ord('a'):
            count_chars += 1
    return count_chars