How can I find objects with the same tag next to each other via overpass-turbo?

For some reason removing the “(._;>;);” that got added by the auto-repair did the trick. :person_facepalming:
So my code now is:

area["ISO3166-2"="AU-SA"];
nwr["amenity"="fire_station"](area)->.a;
foreach.a->.elem(
  nwr.a(around.elem:100);
  (._; - .elem;);
  out geom;
);

The only thing I am still missing is a working out count; to give me the total number of hits.