Depends on the race... usually the counter ends up being out zerging them.
For avent, the iconus guardians have an amazing ability to push them back. It pushes the heavy cruisers out of range of your ships (just put the guardian in front of your ships) and you bombers/illuminators will do the killing.
For vasari, the counter is essentially to just have a bigger fleet or RA. Microing your units definately helps, but if they've managed to amass such a huge fleet, you should already have RA.
For tec, you don't really get amazing unit combos like advent and you don't get the unlimited ships like Vasari, so you're pretty much stuck with either getting a bigger fleet, or massing the "direct counter" ship, which still requires micro
LRM's aren't really the best choice against them. They have light armor which means that heavy cruisers hit them for 150% damage. If you don't want to micro and you want to just mass one unit to counter, carriers with bombers are your best choice. The problem with carriers is that they're very slow and kodiaks have the ability to rush forward, getting into firing range quickly. If you do use carriers, you need to have them run all over the gravity well and hope that your bombers can dispatch the heavy cruisers before you lose all your carriers. When you do run your carriers around, don't run them all in one big clump, split them up into multiple groups. If they focus fire a carrier, move it away from the group. It's going to die anyways, so at least use it to make the kodiaks get away from the current group. If they're not focus firing, scatter the carriers in the group that's getting chased.
Also, remember to micro your bombers and focus fire the support ships, followed by the kodiaks. If the enemy is smart, they will have lots of flak frigates... in this case, just pray your bombers can overwhelm them.
Aside from the advent unit combos, there isn't really a counter to a fleet of heavy cruisers, flak frigates, and support ships.