How to display a count of a type of event in Grafana?

I’m still quite confused about what I can and cannot display in Grafana using InfluxDB data (and even MySQL data) for HA.

I just want to create a panel that shows the number of times in total that a given entity has been switched on.

Is this possible? If so, how do I configure the query for InfluxDB data source?

I too find Grafana a bit mysterious. However, if you edit the graph, under the Query tab you will see “SELECT” followed by your field (eg. field(value)) and then a “+”. If you click on the “+”, the first option is “Aggregations”, and under there you will see count, sum, etc. This will generally replace whatever operator was already there (eg. mean()). In the “GROUP BY” section you can click on time() to change the aggregation interval.