Just to add a bit more explanation:
Carbs are either sugars (which taste sweet) or chains of sugars (usually in the form of starch). These chains are broken down into sugars by our digestive system. Then, all this sugar passes into the bloodstream, which raises your blood sugar. In terms of the amount of sugar that reaches your blood stream, it doesn't matter whether you eat 10g of sugar or 10g of starch.
Digested sugar is not the only thing that raises blood sugar, but it is the most significant. So as a starting point, base your insulin on the total carbs. As you learn what other factors affect your body you can account for them too.