Must be in Taiwan for 183 days per year. How is it counted?

Iirc it’s the same as for income tax: the year goes from Jan 1 to Dec 31. The day after you arrive is day 1, and the day you leave is the last day. If you’re already in Taiwan on Dec 31, you start counting from Jan 1 and include the day that you leave.

Of course don’t take my word for it; ask the NIA or a lawyer.