Use dom:subset_handler() which returns the subset handler of a domain (see domain_bridge.cpp).
And there is subset_handler_bridge.cpp, where the different subset-handlers are registered.
Here you could easily add the different overloads of num_vertices, num_edges, etc. methods
and use them directly in your script: dom:subset_handler():num_edges(subsetIndex)`.
Problem:
Given a domain, how can one find the number of a certain type of geometric element (e.g. Vertex, Edge) in a subset from Lua?
Workarounds (Thanks to @mastep84):
Proposed solution by @sreiter:
See branch https://github.com/stephanmg/ugcore/tree/featureNumElements for details and status (WIP).