I had a similiar problem - never had to worry about weight gain until my ileostomy. Finally I feel better and I have packed on the pounds. I had no idea how to count calories as it never seemed to matter before. Everything I ate just went right through me.
I recently started weight watchers so that I could learn about nutrition and try to diet. Its worked for me and I have been able to lose 5lbs and counting in the last month. I never thought I would need to diet but it seems to be working.
You may want to talk to your doctor about what they suggest and keep in mind it may take your guts sometime to get adjusted to being disconnected.
You are gaining weight because you are finally healthy. I wouldn't worry about it just yet. Take time to fully recover before embarking on a diet. Yes, even though food races through you it does not mean calories are not being absorbed. Calorie absorption takes place in the terminal ileum. Eventually you will be able to take the weight off and it will be just as challenging as with a colon. No secrets, it's all about decreasing calories and increasing exercise.