It's now an option on ATMs.[1][2] Especially in China, where the People's Bank of China has required it for all ATMs.[3] "As at the end of June 2013, there are 197,800 ATMs in use on the mainland, of which 100,700 or 55.28% have been upgraded with the serial number enquiry function. According to schedule, by late 2015, the serial number of every Rmb100 note withdrawn from banks by members of the public can be traced."
Here's an overview of the available hardware.[4] Not only ATMs are recording serial numbers. So are cash counting and sorting machines.
I would be very surprised if this is not already happening.