It's a known scam among grifters, and it's not its first appearance in the media. Wiki elaborates:
Change raising, also known as a quick-change artist, is a common short con and involves an offer to change an amount of money with someone, while at the same time taking change or bills back and forth to confuse the person as to how much money is actually being changed. The most common form, "the Short Count", has been featured prominently in several movies about grifting, notably The Grifters, Criminal, Nine Queens, and Paper Moon.
For example, a con artist shopping at a gas station pays for a cheap item (under a dollar) and gives the clerk a ten dollar bill. The con gets back nine ones and the change and then tells the clerk he has a one and will exchange ten ones for a ten. This is what the scam artist is doing: getting the clerk to hand over the $10 before handing over the $1 bills. Then the scam artist hands over nine ones and the $10. The clerk will assume there has been a mistake and offer to swap the ten for a one. Then the con will probably just say: "Here's another one, give me a $20 and we're even." Notice that the scam artist just swapped $10 for $20. The $10 was the store's money, not the con's.
Here's a video that explains how the con works: