jesikabeth, while the cal in / cal out accounting isn't rigorous, one thing is: Physics. It really is as simple as using more energy than one is eating. Calorie counts are imprecise to begin with, and as Brian has explained, insulin biases the metabolism to convert glucose and store it as fat, rather than burn it.
Rather than counting calories, use your scale as a guide to energy balance. If you're gaining weight, you're eating too much for your activity level. Cut back a little on total caloric intake (its imprecise, but good enough to measure trends) a bit, see what happens. Repeat until you start to sustainably lose weight.
Diabetes has many tricks to confound and confuse. But it must obey the laws of physics. Modifying diet to change the mix of calories to less carbs, more fat is good advice. However, no matter how we slice it, gaining weight in the end simply means you need less energy to function at your activity level than you are taking in and "using" either to power your body, or increase its fat stores.
Finally, look into keto-adaptation and a ketogenic diet. This is a nutritional approach 100% free of carbs. More and more diabetics are going fully, or partially this route. I'm trying to myself, with limited success so far, but only because I'm not ready yet to fully go there. I like a bun with a hambuger too much :-)