Hi folks,

a long time ago in a very near galaxy I worked a lot with disambiguation pages. Those times there was some tool to list them ordered by number of references, so as we knew which disambiguation page to work on.

The tool was not perfect for us for multiple reasons, and we don't find it any more. So I decided to write a script, here it is:
Feel free to use it.

One idea is that number of references is not useful in itself. So number of referring templates will be counted separately, because in many cases the number of references may be drastically decreased by manual edit of a few templates (navboxes, infoboxes, userboxes etc.). In Hungarian Wikipedia botless users helped to correct a lot of bad references caused by these templates. After this we get a clearer number of references to be corrected by bot.

The other point of view was that many disambiguation pages are just disturbing, and we don't want to work on them, so we can exclude them from listing. In huwiki these were the disambiguation pages of bus/metro/tram lines which crosslink to each other, generating 110 thousend bad references, and they are about 3-400. They flooded the beginning of the list, but now they don't flood any more.

You may also set the namespaces, where to count. As we often don't correct references in talk namespaces, we don't want to count them. Now we have a list that is useful to choose the subejct of botwork.