g | x | w | all
Bytes Lang Time Link
190Maple250510T165643Zdharr

Maple, 190 bytes

proc(S)uses ComputationalGeometry;P:=[MultiSegmentIntersect(S,mode="polygon")[],op~(S)[]];max(eval(add~([seq([seq(PointInPolygon(p,s),s=S)],p=P)]),{"inside"=1,"outside"=0,"boundary"=1}))end;

Input is a list of polygons, each of which is a list of points in the form [x,y]; connection from the last point back to the first is implied. The computational geometry package does the heavy lifting. Points that are intersection points between the polygon boundaries are checked, as are the polygon vertices. PointInPolygon returns the frustratingly verbose "inside", "outside" or "boundary", which are converted to 1, 0, 1 respectively for the counts.

Slightly ungolfed:

proc(S)
uses ComputationalGeometry;
P:=[MultiSegmentIntersect(S,mode="polygon")[], # intersection points between polygons
op~(S)[]];                                     # add list of all vertex points
z:=[seq([seq(PointInPolygon(p,s),s=S)],p=P)];  # check if points are in polygons
max(eval(add~(z),{"inside"=1,"outside"=0,"boundary"=1})) # find maximum count
end;