Documentation for this module may be created at Module:Counter/doc
local p = {}
-- Table to hold multiple counters if needed
local counters = {}
function p.increment(frame)
local name = frame.args[1] or "default"
counters[name] = (counters[name] or 0) + 1
return counters[name]
end
function p.reset(frame)
local name = frame.args[1] or "default"
counters[name] = 0
end
return p