Count pieces in Private Window


I have been playing with my own module of Lords of Waterdeep for 6 months now, but for the sake of gameplay we feel the need to have a summary of the game pieces inside each of the players hands.

I did it, I managed to show a counter of the coins in each player’s hand, but it was painful to code and if I think I have to do the same for fighters, clerics, wizards, rogues, corruption, quests and intrigues I feel sick.

So, my question: is it possible to count the amount of certain pieces in a player’s hand and have an automatically updated counter on the main board, for everyone to see?

What I did:
a) Create 1 global property to store the amount of coins per player’s hand, intialised to 0.
b) Created 1 set global property trait per player’s hand, to increase/decrease coins counter
c) Created 4 trigger actions that will trigger either the increase/decrease based on the following:
c1) 1 trigger action per player for coin that MOVES INTO player’s hand (+1 coin)
c2) 1 trigger action per player for coin that has been CLONED INTO the player’s hand (+1 coin)
c3) 1 trigger action per player for coin that LEAVES the player’s hand (-1 coin)
c4) 1 trigger action per player for coin that is DELETED FROM player’s hand (-1 coin) (this took me a while, I had to create a separate DELETE command for each player and restrict access to the DELETE command for non-owning players)
d) Created text label on main board that shows the global property in a)

PLEASE, tell me that there is a simpler way.

Something along the lines of “Count all the pieces that have this marker value in this window and show it on the main board”

Thanks in advance,