When you purchase a gun from a gun store, you fill out a form 4473, for the purposes of a background check. The ATF has a record of gun transfers, but not a list of who currently owns a gun. If they recover a gun from a crime scene, then can go through the records to see who was the last owner.
The kink in this system is that private sales of guns is legal in most states as well. No background check, no record keeping required, just a good faith effort to ensure that the person you're selling it to can legally own a firearm.
So if the police come knocking on your door and ask for your guns, you can simply say "I sold it 2 years ago, but unfortunately I didn't keep any information on the new owner." The police would then need to have probable cause to search your residence for the weapon (which they very well could get depending on the evidence they have).
Collecting all the guns in the US won't be an easy task.