Potatoes have quite a bit of resistant starch which can be inflammatory. Keep in mind that while your body shouldn't generally react with weight gain from something so simple it could be a sign of other issues. As you've indicated, there's a lot more going on than "simple calories in and calories out". Great that you're paying such close attention! Way to go!