def counter(aIntervals):
    """ Count bases in every interval and sum across them """
    iBaseCoverage = iIntervalCount = 0
    for interval in aIntervals:
        # Add one to correct 0-based count
        iBaseCoverage += (interval[2] - interval[1] + 1)
        iIntervalCount += 1
    return iBaseCoverage, iIntervalCount