Overpass turbo search for the number of routes per sation

i am pretty new to this forum - and seriously trying to get a count of public transport bus routes per bus station. my recent experiments resulted in empty outputs. up to now i was able to “select” all nodes which are part of bus-routes that are selected via nodehighway=bus_stop->.alle

my code so far:

// query part for: “route=bus”
  node[highway=bus_stop]({{bbox}})->.alle;
  rel[route=bus](bn.alle)->.rel_alle;
  //way(r.rel_alle)->.way_m;
  node(r.rel_alle)->.node_m;

subsequently, to that, I’ve been trying to count the number of relations based on that set of stations (i.e. nodes) - but couldn’t manage to get any results.
my experimental code

foreach -> .myStop (
    .myStop out;
    (rel(bn.myStop););
    out count;

thx for help in advance
robert

Hi Robert,
I think next part will do what you want.

// In http://overpass-turbo.eu select your area of interest,
// then hit the run-button.
[out:csv(::"type",::"id", name,::"count")]; // text output (no map)
(
  node["highway"="bus_stop"]({{bbox}});
);
foreach->.a( // walk through previous selection
  (.a;);out;
	rel[route=bus](bn.a);
  	out count;
	);

thx a lot - works perfectly !