I don't think you can put a number on it. Correct me if I'm wrong, but the most important items as far as I've read are magnitude/seriousness of the sin, time elapsed since last confession, and time elapsed since last communion.
I am glad you are trying to make sure you are properly prepared for communion. It just seems to me like you are perhaps going about it in an overly legalistic way, perhaps a bit calculating, too. When I was Catholic, I certainly had thoughts like yours along the lines of, "Hey, I should confess the night before so that I don't have time to sin before communion," but I ultimately found it more beneficial to confess when the opportunity to meet with a good confessor was available and then work extra hard to keep myself clean for however long it was until I intended to take communion. If you do the confession the night before, it's great, it's much better than not confessing, but it might not give you much of an incentive to shape up.
KBN1 is absolutely right that you should discuss this with your confessor, though! Best of luck!