def _diff_count(string1, string2):
    """
    
    Count the number of characters by which two strings differ.
    
    """
    assert isinstance(string1, str)
    assert isinstance(string2, str)
    if string1 == string2:
        return 0
    minlen = min(len(string1), len(string2))
    diffcount = abs(len(string1) - len(string2))
    for ii in range(0,minlen):
        if string1[ii] != string2[ii]:
            diffcount += 1
    return diffcount