Use templates to generate the counter implementation for `stdouttrace`, so it can be easily reused in other modules. --------- Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>