def count_morphs(settings):
    """
    Count the number of morph sequences,
    given the number of key frames and loop switch setting.
    """    
    return len(settings['keyframes']) - 1 + settings['render']['loop']