Counting cells within different (polygonal) subregions of an image

I have a large number of images of immunostained brain tissue. Each image contains multiple distinct layers, which I have manually segmented using polygon ROIs. I now need to quantify the proportion of cells that stain positive/negative for various markers within each individual layer. Unfortunately the staining is often rather messy, so I will probably need to count positive and negative cells manually.

The Cell Counter plugin is convenient for counting all of the cells within an image, but there does not seem to be any easy method to “filter” the markers according to a polygonal mask. I suppose could manually re-initialize the counters for each layer and save the results separately, but this would be rather tedious since I have lots of images to process. I could also export the XY coordinates of each marker and the vertices of each layer polygon as .csv tables, then determine which markers fall within each polygon offline, but it would simplify my workflow if I could use a single tool.

Before I embark on writing a new plugin, I thought I should first check here whether there are any pre-existing tools I’m unaware of that could do the job.