Do sold-out items count towards my item limit?
Yes. Every item in your inventory counts, sold out or not. Free holds 25 items and Basic 500; Pro and Business have no limit.
Deleting items you will not restock frees the room, and their sales stay in your history. When five or fewer are left, the add form tells you, and when the binder is full it offers the plans. Nothing you typed is lost.