in reply to best way to keep a simple count?

Been there, done that, did it in many ways. I've used a database, I've used locked files, I've used plain unlocked files open for read/write and used seek, and I've echoed new numbers to files.

What is "best" purely depends on what you want, and what your wishes are. All solutions are simple, requiring just a few lines of code.