what i need to do to find only those songs that are NOT in playlists?
I think you were trying to do the right thing. Searching for "refs=0" is the correct search to find songs that are not in playlists.
Above, you typed "ref=0". You left off the S. That might be the reason all the songs appeared. Not sure.
As to why not all of the songs found their way into playlists, I'm not sure. Perhaps database corruption, or something wrong with the copy process. For example, inducing a situation where you had mixed up or duplicate FIDs, as you might if you tried to combine the songs from two different players, or if the drives didn't get properly formatted. Can you describe what you did to perform the copy?
Also, did you try
forcing a database rebuild?