Module:Sandbox/Perryprog/sandbox

local p = {};

local transcluder = require('Module:Transcluder')

local function referenceCount(referencesText) count = 0 -- Seriously, no string.split method? for match in string.gmatch(referencesText, ' ') do   	count = count + 1 end return count end

function p.main(frame) pageReferences = transcluder.get(frame.args[1], { only = 'references' }) return referenceCount(pageReferences) end

return p