def get_num_jobs(params, start, num):
    """
    Get number of jobs to submit. Takes into account the maximal number of
    jobs available.

    Returns:
    bool num changed?
    int num
    """
    total = params.get_maxnum()
    if start + num > total:
        return True, total - start
    else:
        return False, num