OpenHAB3 / Custom Widget / How to create summary stats (like 'active lights') similar to "location card badges"

Found a very similar question which is open since 14 days:

Without luck yet.