 local pu800 function pu800u82efetch frame local template nilu800 local return_value nilu800 useu800 demo parameter ifu800 itu800 exists otherswise useu800 current template name local namespace mwu800u82etitleu82egetcurrenttitle .namespace ifu800 frameu82eargs "demo" andu800 frameu82eargs "demo" "" then template frameu82eargs "demo" elseif namespace 10u800 then template namespace template mwu800u82etitleu82egetcurrenttitle .text elseif namespace 828u800 then module namespace template mwu800u82esiteu82enamespaces 828u800 .name .. " " .. mwu800u82etitleu82egetcurrenttitle .text endu800 ifu800 inu800 template oru800 module namespace look upu800 count inu800 data ifu800 template nilu800 then namespace mwu800u82etitleu82enewu800 template "template" .namespace ifu800 namespace 10u800 oru800 namespace 828u800 then template mwu800u82eustringu82egsub template " docu800 " "" strip docu800 from endu800 template mwu800u82eustringu82egsub template " u8d8aau8d988u8d8b6u8db8cu8d8adu8d8a7u8d8aa " "" strip u8d8aau8d988u8d8b6u8db8cu8d8adu8d8a7u8d8aa from endu800 local index mwu800u82eustringu82esubu800 mwu800u82etitleu82enewu800 template .text 1u800 1u800 local status data pcall function return mwu800u82eloaddata 'module transclusion_count data ' .. mwu800u82eustringu82efind index " au800" andu800 index oru800 "other" endu800 ifu800 status then return_value tonumber data mwu800u82eustringu82egsub template " " "_u800" endu800 endu800 endu800 ifu800 database value doesn'tu800 exist useu800 value passed tou800 template ifu800 return_value nilu800 andu800 frameu82eargs 1u800 nilu800 then local arg1 mwu800u82eustringu82ematch frameu82eargs 1u800 ' du800 ' ifu800 arg1 andu800 arg1   then return_value tonumber frame callparserfunction 'formatnum' arg1 'ru800' endu800 endu800 return return_value endu800 tabulate this data foru800 wikipedia database reports templates transcluded onu800 theu800 most pages function pu800u82etabulate frame local list foru800 iu800 65u800 91u800 dou800 local data mwu800u82eloaddata 'module transclusion count data ' .. iu800 91u800 andu800 'other' oru800 stringu82echar iu800 foru800 name count inu800 pairs data dou800 tableu82einsert list mwu800u82etitleu82enewu800 name "template" .fulltext count endu800 endu800 tableu82esort list function au800 bu800 return au800 2u800 bu800 2u800 andu800 au800 1u800 bu800 2u800 endu800 local lang mwu800u82egetcontentlanguage ; foru800 iu800 1u800 #list dou800 list iu800 ' nu800 du800 su800 su800 nu800' format iu800 list iu800 1u800 gsub '_u800' ' ' lang formatnum list iu800 2u800 endu800 return tableu82econcat list endu800 return pu800 