PHP Code:
{
if(isPlayer _x) then {
private ["_cnt", "_plr"];
_plr = _x;
_cnt = 0;
{
if(isPlayer _x) then {
_cnt = _cnt + 1;
};
} forEach nearestObjects [_x, ["Man"], 50];
hint format ["%1 players around %2", (_cnt - 1), name _plr];
};
} forEach allUnits;
Didn't actually test the code, but it should work. This cycles through all players and counts players around them and puts number into _cnt. It will include player himself (so it is _cnt - 1 players around him). 50 is radius to check around each player.