Open-source, free, and non-intrusive.
After launching, KMCounter runs in the background via the system tray to collect usage stats; click the tray icon whenever you want to view the results.
On the stats page, use PageUp, PageDown or your mouse wheel to browse past usage records.
There are zero privacy or security risks: it has no internet connectivity at all, not even for update checks, and all your data stays entirely on your device.
Note: Even with full transparency, the app uses hooks to track keyboard and mouse activity, so it may be flagged as malicious by antivirus software; simply add it to your whitelist to resolve the issue.