Visa-exempt: how do they count the days?

I’m wondering how they count the 30 days I’m allowed on my exempt entry. If I enter Taiwan on June 24th, and leave on July 23rd, I leave on the 30th day (counting June 24th). Is this ok, or in violation of my entry permissions? I want to be able to come back, so I don’t want to mess it up!

I’m curious about this too as far as the 183 day rule goes. When you fly out, do they count that day toward the 185 days? How about the day you land? I’ve actually had flights that have left Taipei at 1am and I waited until 12:01am to go thru the customs.

err nevermind, the answer to my question is in this thread: