Further to the last, as any URL might be a duplicate, this is a more thorough test:
var:set vLinkSet;
eachLink(aLink){
if(aLink["url"]){
vLinkSet += aLink["url"];
}
};
vLinkSet+=$URL;
vLinkSet+=$SpecURL;
vLinkSet+=$SourceURL;
vLinkSet+=$XSDSpecURL;
vLinkSet+=$JSONSpecURL;
$URLCount = vLinkSet.count;
It doesn’t tell you which occurrences ate duplicates 9or discrete sets of duplicates) but it does give an accurate count of discrete URL for a given note.
Got a sort of similar situation where you want to iterate through a list of attributes (i.e. Displayed Attributes)? Then see the recent post on Constructing $-references from loop variables - #4 by mwra, whereby you could turn all those per-attribute tests at the end above into a loop through a list of attribute names. I mention this as an example of seeing how you can leverage yourself from code with lots of hard-wired values (e.g, references to specific attributes) into a list of attributes that might be derived from (and changed by) other action code.