It looks to me like everyone here has just about covered it all, but I'll just chime in here real quick and reiterate a point or two...
First, you have to remember that the drug dealers and the drug users both want what they want, and they'll fiercely seek out and protect their interests. The drug dealer wants money, and he'll do whatever he needs to in order to get it. The drug user wants drugs and, similarly will do whatever he needs to in order to get them. Trouble arises when one feels that the other isn't holding up his or her end of the bargain. If the drugs come up short or not on point, or if the money comes up short... it's not a good thing.
For the most part, if everyone does right by one another, then there's no problem at all. I've never had a problem, and I've never known anyone to have a problem, but it can happen...
You have to remember that, typically, a drug deal is a quick, quick transaction. It's not often, in my experience at least, that the drug dealer will even count the money on the spot; and it's not often that the drug user will check out the product's quality/quantity on the spot either. In my experience, it's all just done on trust... the dealer trusts me that I've given him the right amount of money, and I trust the dealer that he's giving me what I payed for. He quickly pockets the money, and I quickly pocket my drugs. So far we've never had a problem...
With larger quantities of drugs, well, things become just a bit more complicated. We've never bought in too large of quantities before, but we have purchased a bit more than "average," I suppose, on just two or three occasions, and I think that it's one of the few times I've seen a dealer count out the money on the spot, or thumb through it at least. With even larger quantities of drugs, I imagine that there exists an ever greater possibility of something going wrong, as it's an opportunity for one or the other to either a.) make out with a lot of money by shorting the drugs or b.) make out with a lot of drugs by shorting the money.
But, generally speaking, drug deals don't go wrong... the user comes through with the money and the dealer comes through with the drugs. Think about it, the dealer wants to stay in business, so it's in his best interest not to screw things up. And the user wants to continue picking up his drugs, of course, and so it's in his best interest to come correct and not short his dealer.