It would look something like this:
first create a script and put its function there, example:
function script scripttest {
getmapxy @map$,@x,@y,0;
dispbottom "Quantidade de jogadores no mapa atual: "+getmapusers(@map$);
end;
}
then just go to the item script and use callfunc, in this example I used '2201':
Id: 2201
AegisName: "Sunglasses"
Name: "Sunglasses"
Type: "IT_ARMOR"
Buy: 5000
Weight: 100
Loc: "EQP_HEAD_MID"
Refine: false
ViewSprite: 12
Script: <" bonus2 bResEff,Eff_Blind,500; callfunc "scripttest"; ">
You can also make this number update every time the number of players changes on this map, it all depends on what you want.