def count_y_clusters(y):
    """
    Count BGCs regions in a list of protein domain BGC states. Done by counting all consecutive 1 as one region.
    :param y: List of BGC states (0 = non-BGC, 1 = BGC), one state for each protein domain
    :return: Count of BGCs in given list of protein domain BGC states.
    """
    prev = 0
    clusters = 0
    for val in y:
        if val == 1 and prev == 0:
            clusters += 1
        prev = val
    return clusters