Counting length-2 substrings that are common to two strings at the same offset -- Python
There is no such word as "occurencies".  In any case, all_two_chars_occurencies is a very long name.  I suggest pairwise_chars.  Note that it could also be written in a style similar to the pairwise() recipe in Python's documentation.

In Python, explicit looping is slightly cumbersome.  Fortunately, Python offers many ways to just do what you want as a "one-liner", without looping.  Here's one approach, which uses a generator expression, and this technique to find its length.

def common_two_chars_occurences(a, b):
    """
    Given 2 strings, a and b, return the number of the positions where
    they contain the same length 2 substring.

    &gt;&gt;&gt; common_two_chars_occurences('xxcaazz', 'xxbaaz')
    3
    &gt;&gt;&gt; common_two_chars_occurences('abc', 'abc')
    2
    &gt;&gt;&gt; common_two_chars_occurences('abc', 'axc')
    0
    """
    return sum(1 for pair
                 in zip(pairwise_chars(a), pairwise_chars(b))
                 if pair[0] == pair[1])