import re


def count_last_empty_lines(s):
    """Count Empty lines at end of s"""
    cnt = 0
    lines = s.splitlines()
    lines.reverse()
    for l in lines:
        if re.match("^\s*$", l):
            cnt += 1
        else:
            return cnt
    return cnt