There really isn't just one formula for card counting. I wouldn't even say its a formula, its more of a system. If you want a basic system for card counting i would Google "hi/low card counting system". That's probly the easiest one to start off with.
Good luck man