Just my feelings, when someone puts something, anything in my hand, I always say thank you - just me, just my habbit. Truthfully, if I am polite enough to HAND someone something, they should be polite enough the say thanks, I mean, its not like its much effort.
And my automatic response when someone hands me cash to pay for something is to say "out of $x". I just told them the total, they hand me money, I verify the amount with them, count change and then say "thank you." If I say thank you when I'm handed the cash then it delays the whole transaction, or slurs together with the confirmation "out of $20, thank you..." doesn't really give them time to respond/correct before I have the change in my hands.
Not that efficiency is the most important thing in a transaction, but I learned my money handling habits in a busy ice cream store. Moving the line and cheerful smiles/conversation made everyone a lot happier than many automatic "thank you"s. Someplace where transactions were more leisurely and personal, things might be different.