After some experimentation I think I understand what is happening. First some background on how Music works. The Music app is a Graphical front-end to a database which in turn contains multiple other databases. The actual tunes are stored in one of those internal databases and what you see in the app are links, or pointers, to the actual tunes. When you drag an object (tune, album, playlist) from Music the number in the icon indicates the number of tunes linked to that object. When you drag a tune from your playlist and the number is zero it indicates the tune represented by the icon no longer exists in iTunes or the link between the actual tune and the library entry has been broken. While broken links are relatively rare, there are a lot of ways they can get broken and I would venture that for those of us whose Music libraries have existed for decades and have gone through several updates, rebuilds, and changes from the earliest iTunes until 2021 it is rare not to have at least a few broken or missing links (no pun intended). However the number of missing links you are encountering (~20%) is, in my experience, extreme and I have no explanation for why this may have occurred in your library. Certainly I have never encountered anything like that, but my library is synched across all of my devices via iCloud and I only store a very few carefully chosen selections on my iPhone and watch.
Fortunately there is a relatively easy fix.
- Launch Music while holding down the Option key (⌥)
- From the menu that appears select "Create Library…"
- The default is Music 1 and that is as good a choice as as any. NOTE: This does not delete you existing corrupted library, rather starts a new index into your Music Library. The downside is, you will lose your carefully curated playlists. 😢
- You can switch between your old and new Libraries simply by holding the option key (⌥) when launching Music.
NOTE: This will not restore tunes that have been deleted from your library but if the tunes still exist in your Library the links will be restored.