def n_considered_cells(cc, look_at):
    """
    Calculates the number of considered cells
    """
    count = 0
    for p in cc:
        if not look_at[p]:
            continue
        if p==0 or cc[p]==0:
            continue
        count += 1
    return count