Playing online
There's no doubt there are some rigged casinos online. However, I've played a lot at Internet casinos. If you stick to the name brands, I think you can be very confident that you'll be dealt a random game. The smart and well-financed operators realize they'll make much more money long-term by offering fair games.
As for card counting, virtually all the online casinos shuffle after every hand. There are a handful of exceptions, but even those only deal about 25% before shuffling.