You cannot do this in html, however you can use a server side scripting language like perl or php to do this.
What you will need to do is on forum submission you use your script to first read the log file, parse it to an integer, add one, then printing it on the log file. To avoid a infinite 1234567.. and so forth, just create a separate text file for your script to access and overwrite. Or continuing to append to a log for a count would be extremely annoying.
The other option is to store it in a database :p