def count_simulation_problem_batches(n_simulation_problem_chunks, n_simulation_problems,
                                     n_simulation_problem_batches_per_chunk):
    """
    Count batches to be generated.

    :param n_simulation_problem_chunks: number of chunks of simulation problems
    :param n_simulation_problems: number of simulations to perform
    :param n_simulation_problem_batches_per_chunk: number of batches to evenly split each chunk into
    :return: number of batches
    """
    return min(n_simulation_problem_chunks * n_simulation_problem_batches_per_chunk, n_simulation_problems)