You need to know the concentration of caffeine in the soda by a percent or a molarity. Let's say that you know molarity, M
The "deadly" amount of soda = 10 g C (1/ molar mass of C)(1/ molarity)
The units cancel as molar mass has units of g/mole and molarity is moles C/ liter of solution.
Then you have to convert liters to fluid ounces and divide by 12 oz/can to get number of cans.