def count_common_words(x, y):
    """ Extract number of common word between two strings """
    try:
        words, cnt = x.split(), 0
        for w in words:
            if y.find(w) >= 0:
                cnt += 1
        return cnt
    except Exception as e:
        print(f"Exception raised:\n{e}")
        return 0