https://github.com/dacap/keyfreq.git
git clone 'git://github.com/dacap/keyfreq.git'
Include the following lines in your .emacs
file:
(require 'keyfreq)
(keyfreq-mode 1)
(keyfreq-autosave-mode 1)
And use keyfreq-show
to see how many times you used a command.