def count_all_pixels_per_block(clr, supports):
    """
    Calculate total number of pixels per rectangular block of a contact map
    defined as a paired-combination of genomic "support" regions.

    Parameters
    ----------
    clr : cooler.Cooler
        Input cooler
    supports : list
        list of genomic support regions

    Returns
    -------
    blocks : dict
        dictionary with total number of pixels per pair of support regions
    """
    n = len(supports)
    x = [clr.extent(region)[1] - clr.extent(region)[0]
         for region in supports]
    blocks = {}
    for i in range(n):
        for j in range(i + 1, n):
            blocks[supports[i], supports[j]] = x[i] * x[j]
    return blocks