From Ohio State University Health and Discovery:
Even if you were to reheat the pasta, potatoes or rice after they were refrigerated, they’ll still be lower in calories than if you ate them right after cooking. The amount of resistant starch in them may decrease slightly, but those foods still will be less caloric than they were originally.
How long the carb has to be in the refrigerator to convert its starch into resistant starch varies, depending on the type of food. Generally it’s recommended the carbohydrate be refrigerated for at least 24 hours.