Grabbing VM Count per Host

Hey everyone,
I’m looking for a reliable way to be able to tell how many VM Guests are on any given VM host at any given point in time. I’m currently using a mixture of centreon (nagios derivative) and telegraf/influx and both tools put out a lot of good information, but the one thing I cannot figure out from either is the VM count or VM’s currently on the host. I did find an article on google how to do this with a query however it appears things have changed since that article was posted and the recommended query isn’t working. Any ideas or experience you might have would be greatly appreciated :).