Thread:Extension talk:Autoincrement/Site wide autoincrement?

Is there a way to implement an autoincrement site wide? like store the hook in a template and call that template across multiple pages? like template:Autoincrement then you have page Cookies calls  which brings 1 then page Bananas calls  and gets 2, etc...