def get_counts_in_time(counts, seconds=60):
    """
        Split up a list of times (each representing a single count)
        to get a list containing the number of counts in each interval of
        the parameter 'seconds'.
    """
    start = counts[0]  # The start value of each interval.
    # Tuple containing list of times and associated counts.
    counts_in_time = ([], [])
    temp_counts = 0  # Number of counts in the current interval.
    for c in counts:
        if c - start > seconds:  # If we exceed interval, start a new one.
            counts_in_time[0].append(start)
            counts_in_time[1].append(temp_counts / (c-start))
            temp_counts = 0
            start = c
        temp_counts += 1
    return counts_in_time