It looks like you're new here. If you want to get involved, click one of these buttons!
I am very happy, that KLayout has such a powerful Python API! As it seems to be work in progress, though, it has some obvious features missing I guess. Is there a simpler (and perhaps more efficient) way to get number of polygons in a region than following?
len([p for p in reg.each()])