How can I display the "length" of selected keyframes (number of frames in-between)
So I ended up trying to make an add-on by myself. It works, but the code is a mess, since it's been years since I last did anything in Python, and I know little about the Blender Python API. But it works.

Source code is here (MIT license): SelectedKeyframesLength.py