Your backlog should first have an order. Only then think about the limit.
As you develop things, you discover new work that needs to be done, so you add that to the backlog. You might do some of this work, or with time, some of the items you added to the backlog will become obsolete or unnecessary. At that point it makes sense to purge them from the backlog. If you look at Scrum for example, this is the refinement activity where items are added, changed, removed and organized in the backlog.
If you have an ordered backlog that was properly prioritized, you will have the unneeded work at the bottom. You can then (periodically or from time to time) work your way upwards and purge whatever you don't need or has become obsolete (valid requested work now might not be valid work anymore at a later time).
I wouldn't delete them though, I would close them with some invalid status (won't fix, won't implement, duplicate of, etc). On your backlog you then just put a filter to show those that have the status open, work in progress, todo, etc, which limits the backlog to those items you know are needed at some moment in time.