Are you interested in the mathematical theory or is there a practical reason for your question?
The key count is just whatever count your advantage is >0%. AND it's not set in stone. Different rules, and different penetration could even change the key count for a given # of decks. Some times it might be -6, some times -7, and some times -5, even though all these situations could be for 8 decks.
Simulations (i.e. cvdata, cvcx, ...) are a time-tested way of knowing what the advantage is for a specific set of conditions and how to correctly bet at each advantage.