
    In a credit assessment system, determine the validity of a transaction code by counting how many characters appear in positions that match their natural alphabetical order (e.g., 'A' in position 1, 'B' in position 2, etc.), ignoring letter case. This validation check helps verify if the transaction code follows the bank's standardized formatting protocol for credit scoring identifiers.
    

    
def count_char_position(str1):
    """
    In a credit assessment system, determine the validity of a transaction code by counting how many characters appear in positions that match their natural alphabetical order (e.g., 'A' in position 1, 'B' in position 2, etc.), ignoring letter case. This validation check helps verify if the transaction code follows the bank's standardized formatting protocol for credit scoring identifiers.
    

    """
def count_char_position(str1):
    """
    In a credit assessment system, determine the validity of a transaction code by counting how many characters appear in positions that match their natural alphabetical order (e.g., 'A' in position 1, 'B' in position 2, etc.), ignoring letter case. This validation check helps verify if the transaction code follows the bank's standardized formatting protocol for credit scoring identifiers.
    

    """
    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