A helpful player pointed out that the number of secrets on a level, as well as the number of discovered secrets, was not always displayed accurately. To check the secrets, press the map key (M by default) and look in the upper left hand corner.
I discovered a probable cause for this issue in the script, and have addressed it. My testing has shown it to be resolved, but it's always possible that I missed something. Please let me know if the issue crops up again.