How to calculate total number of element used per Node

I'm looking for a way to either run a SQL query, or generate a report, that summarizes the total number of SolarWinds elements used per node (Bonus points if it can be per "custom property").  I've look at a previous solution here, https://thwack.solarwinds.com/message/333275#333275​, but that seems to only count NPM specific elements. We also leverage other SolarWinds modules such as SAM, WPM, UDT, and NCM. The larger purpose is to enable me to track growth over time to anticipate when we will need additional polling licenses. The reason for the granularity is to identify which groups using our monitoring environment are consuming the majority of our Polling Engine license costs.