Simple mod that collects anonymous player count metrics for modpack authors, sends it to a centralized web server, and stores it in InfluxDB for easy Grafana viewing of historical data:
This mod integrates with Better Compatibility Checker and will use the version number from your BCC config if possible.
Metrics endpoint URL is configurable, as well as pack ID and the rate at which keepalive requests should be sent.
You can find an example server here on GitHub, which just collects current usage stats for each modpack ID and optionally sends it over to Grafana.
Note: this mod does not send player information, usernames, or IDs. It just makes a simple "I'm playing" request with the modpack version you are on, every so often, to track online players.