Your FPS counter should be working. On the Scratch website, you won't be able to make the FPS counter go higher than 30 since that's the framerate all the projects run at. If you want to try testing your FPS counter at higher framerates, you should share your project and port it into Turbowarp. Holding the alt key and pressing the green flag will switch the project to run at 60 FPS.

Anyway, if you want to try a different script that doesn't involve resetting the timer, you can use this:

when flag clicked
set [Previous v] to (0)
forever
set [FPS v] to ((1)/((timer)-(Previous)))
set [Previous v] to (timer)
end