The smart counterfeiters intermix phony batteries with the real deal. That's how it works. Sometimes it's even done at the port of entry. Near here, at the Port of Oakland where a great many cargo ships arrive, dock workers have even been caught with counterfeit security seals to the containers themselves, after the fact. It's a huge problem, especially when it comes to counterfeit auto parts, but affects many other kinds of products too. Wal-Mart rigged a paperwork system to bypass inspections. And in the tool repair dept adjunct to my own position, we caught Home Depot doing high-volume battery switch-outs for cordless drills. The problem got so bad overall that Makita had to send out special letters warning of the counterfeiting epidemic and how to detect it.
And of course, ordinary battery shipments brought down at least two freight airliners due to explosive onboard fires. Now there are restrictions on shipping batteries by air. Even NASA, who should know better, lost a two billion dollar satellite prototyping structure due to use of a generic lithium battery in the assembly room. Ordinarily, lithium batteries are completely banned for aerospace applications; but I guess they thought that since they were still on the ground, they could make an exception.
So how do you detect it? It can be difficult, since the look-alike skills and packaging has gotten so much better over time. But look for small anomalies or typos on the package. If there is a stack of batteries on a store hook, see if the serial or date numbers exists in a logical sequence. I one of the batteries you bought from the same source previously failed prematurely, get suspicious. Avoid discount brands. I've had good luck with Varta silver oxide, but have used Duracell without incident, even though, being a major brand, they do get counterfeited at times.
Costco often contracts for second-quality items. Its not like buying eggs or cheese there. And Amazon is a giant octopus with its tentacles all over the place. They license their search engine and payment method to all kinds of businesses, some of which are quite shady. They do a poor job monitoring for counterfeiting, even in their own distribution inventory. So just do a little extra homework when ordering using the Amazon site. There will be plenty of legit vendors to choose from too.