This no longer works with newer versions of firefox since the Keyconfig extension is dead. I use Greenshot for imagegrabbing, and that displays the pixel size.
Start by grabbing
Go to Tools->Keyconfig->Add a new key->Code is
The shortcut key won't work to turn of MeasureIt, but you can use ESC for that.
I use CTRL-E, good for left hand when right is on the mouse, and not really used for anything (it's bound to web search, but you can unbind it easily)