Check the topic below.
and for the node you will find it in the below script.
Tiles Counting v1.dyn (63.2 KB)