You may be considered a tax resident of Tunisia if you spend at least 183 days in Tunisia during a calendar year, whether continuously or across multiple stays. Tunisia also has other tax residency criteria, including having your principal residence in Tunisia, which are not tracked by this day-count rule.
https://taxsummaries.pwc.com/tunisia/individual/residence