We can start with an example (you never give us an example output).
Say, if switch 1 is used in 3 events, twice in event 1, three times in event 2, and once in event 3, what to output?
Switch 1: 3
OR
Switch 1: 6
I tried to make an assumption about what it is you want, need, and expect. Unfortunately, this thread is too confusing for me to even know where to start.
Your title is conflicting: "on all maps" suggests that you're asking about Self Switches (only Self Switches are tied to maps), but "regardless of names" suggests you're asking about regular Switches (Self Switches don't have names).
I even considered the possibility that you might be talking about the Event Searcher, but I'm currently looking at Map 006, searching for Switch 0001, and I'm getting a hit for Map 005. Since you mentioned "on all maps" and that's precisely how the Event Searcher works, you're probably talking about something completely different. Also, the Event Searcher uses names only for Events, not Switches.
I honestly have no clue what you're asking about, sorry.