def get_counts(content):
    """ Returns a tuple (iteration_count, kernel_count) from the times
    contained in the file. """
    iteration_count = 0
    kernel_count = 0
    for t in content["times"]:
        if "cpu_times" in t:
            iteration_count += 1
        if "kernel_name" in t:
            kernel_count += 1
    return (iteration_count, kernel_count)