Limit number of markers added

I am making my first attempt at building a Vassal module from scratch, and I have a question about using the Place Marker trait.
I am using the trait to place a marker on the board associated with another counter, and want to know if it is possible to limit the number of markers placed from that counter to just one or two. I am not sure if this is possible, or just beyond my current abilities.
Some context to help explain what I am trying to do, the game is Avalon Hill’s Geronimo, and I am trying to limit the number of War Parties for each village/tribe.

Briefly, you would need to add a Dynamic Property (DP) (if the count only needs to be known by 1 piece) or Global Property (GP) (if the count needs to shared between pieces) to keep track of how many markers have been placed, and then use a Trigger Action that checks that DP/GP before firing the Place Marker trait, and also tells the DP/GP to increment itself when firing the Place Marker.

Thanks for the quick reply. Now I just have to figure out how to set up the Dynamic Property. Just another step up the learning curve.