def convert(value, row):
    """Assigns integer to ccnt based on string in cchgcntx, if unable to 
    convert to integer logs an error. This conversion error singles that new
    data is present in cchgcntx which needs to be reviewed.
    """
    missing = 9999
    unknown = 9999
    
    convert_key = key_as_str(row['cchgcntx'])
    
    if convert_key:  
        try:
            cts = int(convert_key)
            
            if cts >= 9999:
                log.write('ccnt', [row['id'], row['rapstatex'], convert_key, cts, 'matched counts exceeds max length for ccnt. Check ccnt rules'], 3)
                return unknown
            else:
                return cts
    
        except (TypeError, ValueError) as e:
            """Step 2: Complete a report with any new information."""
            log.write('ccnt', [row['id'], row['rapstatex'], convert_key, e])
            return unknown
    else:
        return missing
    