If you are going to stay at a ryokan for the first time, I would suggest only one night. Being expensive, sleeping on tatami mats and a futon on the floor with a very hard pillow filled with beans, being served a small quantity of food that you may not like, and the experience of communal bathing, one night may be enough. When I started coming to Japan often, several years ago, I always wanted the ryokan experience at least once during my stay. Today, I wouldn't even consider it.