Module:WLHTotal

local p = {} function p.main(frame) if frame == mw.getCurrentFrame then args = require('Module:ProcessArgs').merge(true) else frame = mw.getCurrentFrame end local page = args.title or mw.title.getCurrentTitle.text local redirects = frame:callParserFunction{name = '#dpl', args = { '',		linksto = page, format = ',%PAGE%,|,', redirects = 'only', debug = 0, }}	local pages = frame:callParserFunction{name = '#dpl', args = { '',		linksto = redirects .. page, format = ',%PAGE%,;,', redirects = 'include', debug = 0, }}	local tbl = mw.text.split(pages,';') return #tbl-1 -- because there's a trailing ; end return p