Move declaration of pandoc-counter to top-level.