Card counting strategies are not perfect play. The strategy you are talking about, Hi-Lo, has a playing efficiency of 0.51, 1.00 meaning perfect. 0.7 is about as high as you are going to get with counting. You can improve this with higher level strategies or side counts (and will find all too many posts here about such). CC is meant to give a human an edge with a reasonable amount of effort. It's not designed for use by computers.