Aside from the debate over Nintendo's motives here, it's true that counterfeits do exist in large numbers these days and it's a problem for a lot of people. Not everyone who buys old games is an experienced collector who knows how to spot the fakes. Some people just want to revisit a game from their childhood, and they'll end up accidentally buying a bad fake, made in China, that reuses chips from another device not designed for this purpose, and has the wrong save hardware which constantly puts your data at risk even if it works, and any number of other problems.
In short, always know what the game you're looking for is supposed to look like, especially if it's a GBA or DS game. Look at the plastic itself, and any logos imprinted in it. Does it look different than normal? Pokemon Ruby/Sapphire/Emerald use translucent plastic, but FireRed/LeafGreen do not.
Know the label. Lots of counterfeits try to photoshop a recreation of the real label from the ground up, instead of making a more direct copy. Some of them do a bad job. Look for anything obviously out of place, like a weird variation of the ESRB label that clearly isn't the real one. Is the label supposed to be shiny? Metallic-looking? Pokemon Emerald is supposed to have a sort of fragmented holographic effect distinct from the other Pokemon games. And real GBA games have a small number physically imprinted on the label, generally near the right side. Sometimes you can see that in pictures, and that's a good sign.
Edit: I went to go look for a quick example and found a fun one:
imgur.com/a/uOasupD
Look at that. The top cartridge is real. The bottom one isn't supposed to have those characters on it. Come on.
Some DS Pokemon games have infrared communication features. Those cartridges are supposed to be much darker than other DS games. That's a good sign. If you see a normal-looking grey Heartgold/SoulSilver/Black/White/Black2/White2, run away.
Study the backs of real DS cartridges (the whole back, including the Nintendo logo, the text right below it, and the printed serial number). I've never seen a fake get the whole DS cartridge back to look right. If you get to know the real ones, fakes will stand out like a sore thumb to you.
And never buy anything that ships from China.
See how complicated this is getting? That alone illustrates how much of a problem counterfeits have become. In my experience it's always possible to spot the fakes, but you do need to know what you're doing. If anyone ever needs help with this, feel free to PM me about it.