$count does work, it just only [apparently] works on the first line of the multi edit box
No, $count works on any string you pass it, it's $did() that is only returning the first line, so you're passing only one line to $count, it's not $count that is ditching away the rest.
And no, I was saying you could use on *:dialog:buttons:init:0: to automatically add the clipboard to the editbox, that way you only have to click a button.
You can choose the character separating the lines in $didtok, you don't have to use a comma.