There's only like ~55 billion us banknotes in circulation (according to uscurency.gov). It wouldn't surprise me to find out that banks' counting machines scan each of them, and put the serial number and location into a database, and that database flags bad serial numbers and things like "this serial number is also claimed to be in a vault 1000 miles away" - causing the bill to be flagged, set aside, and turned over to the secret service.
The working set of data needed for this type of thing could probably be stored in a couple TB - small enough to be in a single (beefy) server's RAM.