I notice that new functions such as Count() have two forms. For example,
Count(expr) - counts across all maps
Count(expr, map ) - counts on specified map
Perhaps, this is a general format already too well established in Vassal to go against, but it occurs to me that it would be more safe for module performance in general and flexibility of use, if the default [e.g. Count(expr)] was just to operate on the current map. And (perhaps this already works, I have not tried), if the fully qualified version would accept a regular expression that would be pattern-matched against all maps (assuming that it contained a wild-card specification).
Just an idea…
PS Count() in particular is proving very handy to me and I am finding performance very acceptable. In my application so far, I am able to limit the target pieces by area (e.g. Location and Zone) and I guess this helps.