When you stamp a note, the stamp action runs on each selected note, once. The same action occurs whether your stamp one note or many. So the number of items selected is a diversion.
By “all basic and text links”, I assume you mean outbound links form the selected note to other note(s). Hint, read the first paragraph of the linked articles above as they describe this aspect explicitly. If not sure, please quote the text that is not clear. Spoiler (click to reveal answer): see unlinkTo().
Next, having selected your method, you need to define a group designator. Look at the list on the latter page. Which of the listed terms do you think would define all the notes linked from this one? You can click any item for a full description. Spoiler (click to reveal answer): did you try all?.
Lastly, the linking operators tend to have an optional link type input that allows your to filter for particular link type(s) only.
Omitting this argument implies all link types, so you don’t need this argument in your stamp. Testing, I discovered a bug! You need to use `"*" as the second argument (N.B. docs not yet updated).
I’ve constructed the above answer in this way as the answers are there, but you will often have to follow links if you don’t already understand the link types. In this case, starting from the aTbRef action code list don’t think you’d need to read many aTbRef pages.
It simply isn’t feasible to answer every question as a worked example (and obvious questions are subjective).
Hopefully, I’ve guided you to an answer in a manner that will help you next time with a similar but different occasion. If not, and there’s some ambiguity I’ve completely missed, do say. The latter is something that would need addressing at source.
Suggested stamp code: spoiler (click to reveal answer):