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