How about the naive way of counting line end characters? Or am I being completely naive?
I think that a normal pulley would work the best. You already have an anchor, the top bar. Pull by that to open the pulley menu.
Silly me! Of course! That works, thanks!