Fix bug in _update_fps_counter

The version of _update_fps_counter currently on github does not work, but the version on the website and in the kindle ebook are fine. I just replaced the broken github code with the code from the website and everything works now, afaik.