On your first question, loops that delete items should always start from the back of the line rather than starting from the front. Imagine you have a queue of items where you remove item 3 and step to (the now) item 4. The end effect of this is that your loop skips any item immediately after any item that is deleted.
To avoid this procedural issue, you start from the back
Code:
For i = ActiveDocument.Shapes.Count to 1 Step -1
If ActiveDocument.Shapes(i).AutoShapeType = msoShapeRectangle then ActiveDocument.Shapes(i).Delete
Next i
When you ask about current selection, there are two possible types of selections relevant to Shapes - because they are 'floating' objects that don't reside in the same layer as the text.
If you have selected the shapes themselves, you can use
Selection.ShapeRange.Count
If you have selected the text where some shapes are anchored, this is much more difficult and you would need to loop through all the ActiveDocument.Shapes and test whether their anchor is in the selected text.