def _update_count_down(previous_count_down_minutes, check_mail_interval, current_time, start_time, main_window) -> int:
    """
    Utility method, update status message text ("count down") until next mail check begins
    :param previous_count_down_minutes: current state of counter
    :param check_mail_interval: given mail check interval from config
    :param current_time: current timestamp ("now")
    :param start_time: timestamp starting point of the current interval
    :param main_window: the main window (PySimpleGUI element)
    :return: current countdown counter in minutes (int)
    """

    # count down minutes until analysis is launched
    count_down_minutes = check_mail_interval - int((current_time - start_time) / 60)
    if previous_count_down_minutes >= (count_down_minutes + 1):
        main_window['-STATUS_MSG-'].update('AKTIV - nächste Analyse in ' + str(count_down_minutes) + ' Minuten',
                                           text_color='red')

    return count_down_minutes