Install the package.
pkgstats is set up to automatically run every week using systemd/Timers. Once installed, it will be activated after the next reboot.
If you do not want to wait for a reboot cycle, you can manually start
pkgstats can also be run manually: see
pkgstats -h for usage information.
Results and reference
There is a public JSON API to query statistics: API documentation.