import glob


def total_frame_count(dir):
    """
    Returns the number of frames found in a directory.
    """
    frame_files = glob.glob("{}/frame_*.png".format(dir))
    num_files = len(frame_files)
    return num_files