I have been to both countries on business and vacation, and hands down Japan has more variety, history and outdoor scenery. I would go for at least 2 weeks as a balance between cost and the time and effort to get there.
Taipei has an unbelievable national museum (the artifacts removed from mainland China when Mao and the communist party took over), some gardens and temples of interest, and GREAT food. However, outside of Taipei there is natural sub-tropical beauty but not much history or variety compared to Japan. Is there a reason you would choose Taiwan over mainland China where you can see the Forbidden City, Great Wall, Temple of Heaven, the Song Dynasty gardens of Hangchou, bustling Shanghai and the Xian Warriers to name a few?
Japan not only has spectacular natural beauty, but also a 2,000 year old history, 800-year old gardens and amazing temples. Tokyo is the only truly high-tech megopolis in the world. And Japan is CLEAN and absolutely zero crime, so you can stay in a less-expensive hotel and not worry. I use www.TripAdvisor.com to check on ratings and prices of hotels.
http://www.tripadvisor.com/Hotels-g298564-Kyoto_Kyoto_Prefecture_Kinki-Hotels.html
Currently, you will need to spend about $125/night for 2-star, $150/night in Tokyo or Kyoto (with tax) for 3-star lodging. If you want 4-star digs plan on $250-$300/night, and 5-star up to $700 (Four Seasons, Ritz). Check Japan Travel Bureau USA (the equiv of American Express Travel in Japan) for rates as well, as they pre-negotiate blocks of rooms at a discounted price in each city. Food is where the expense is as practically everything is imported. However, you can eat at McDonald's or a noodle shop if you have to, but even this will still put you back $10-$15/person. Also, go to the basement floors of the department stores (Mitsukoshi, Takashimaya, Matsuya, etc.) for buying prepared (and cheap) food. You can check Japan Travel Bureau USA web site which they FINALLY updated, will give you a lot of prices, including the price of 1/2 day and full day tours in each city:
http://www.jtbusa.com/en/default.asp
You can buy (must be bought before you leave) a 7 or 14-day Japan Rail Pass which will allow you free bullet train (shinkansen) travel on the Hikari and Kodama lines, getting you to most cities you will want to visit, and not stress out about travel costs.
Stay in a hotel near ANY main metro station in central Tokyo, and it is a snap to use the metro to get anywhere else in Tokyo (all color-coded with english signs). You can buy a day-pass for the metro.
You will be in Kyoto in Spring at cherry-blossom time, so make sure not to miss the geisha dance ceremony called the "Miyako Odori". If you go in April you will see the Gion geisha (the best), and in May the Pontocho Geisha (not as good). Make sure to buy tickets in advance, there will be none if you try to buy them the day of the performance. You should also apply in advance to visit the private Imperial gardens around Kyoto for the Japanese Emperor, Katsura Villa for instance (no charge for visits).
Bring good, comfortable walking shoes! Hope this helps.