I believe your original problem is related to the fact that
PlusWnd.LstView_GetCount("ListView") is not constant (it decreases each time you remove an item) and as such your 'i' isn't going through all the necessary loops.
It
works for 1 item because it loops through '0'.
It
works for 2 items because it loops through '0', '1'.
It
does not work for 3 items because it loops through '0', '1'.
It
does not work for 4 items because it loops through '0', '1', '2'.
etc.
EDIT: I don't see why my while() loops wouldn't work though
(I haven't tried it though)