def iteration():
    """
    Returns the number of iterations since the current top-level sequence started.

    Returns:
        int: iteration count.

    """
    from niveristand.library._tasks import get_scheduler
    return get_scheduler().get_task_for_curr_thread().iteration_counter.count
