Maybe it's just me, but I find I run into problems using both scon and scid in a single code.
Here's my suggestion
alias queries {
var %query
.scon -at1 inc %query $!query(0)
return %query
The problem that I see (unless I'm imagining things) with xDaeMoN's suggestion, is that if you disconnect from a network, the $scon for that network gets dropped until it's needed, as the cid (as used by scid) does not get dropped, so if you have 4 connections, then drop the 2nd, now you have connection 1,3, & 4 (by cid), and scon(2) will return a $null value...for this situation I don't think it's going to matter, but just my 2 cents worth.