def _total_probe_count_without_interp(params, probe_counts):
    """Calculate a total probe count without interpolation.

    This assumes that params are keys in the datasets of probe_counts.

    The result of ic._make_total_probe_count_across_datasets_fn should give
    the same count as this function (if params are keys in the datasets
    of probe_counts). But this uses probe_counts directly and can be
    used as a sanity check -- i.e., it does not do any interpolation.

    Args:
        params: parameter values to use when determining probe counts;
            params[i] is the (i % N)'th parameter of the (i/N)'th dataset,
            where N is the number of datasets
        probe_counts: dict giving number of probes for each dataset and
            choice of parameters

    Returns:
        total number of probes across all datasets, according to the
        given values of params
    """
    num_datasets = len(probe_counts)
    # The total number of parameters must be a multiple of the number
    # of datasets
    assert len(params) % num_datasets == 0

    num_params = int(len(params) / num_datasets)

    s = 0
    for i, dataset in enumerate(sorted(probe_counts.keys())):
        p = tuple(params[num_params * i + j] for j in range(num_params))
        s += probe_counts[dataset][p]
    return s