Hi, it seems to work - at least partly - with the following code:
[out:csv( "count:byregion", name, total, nodes, ways, relations )];
area[boundary=administrative][admin_level=6]["de:regionalschluessel"];
foreach->.regio(
node(area.regio)[amenity=pharmacy];
make count "count:byregion" = regio.set(t[ "count:byregion"]),
name = regio.set(t["name"]),
total = count(nodes);
out;
);
However, unforunately, the list of “Landkreise” is not complete, only reporting about 80 of over 400 available ones. 