Taiwan has vowed to take "counter-attack" measures in case China enters its territory, as it announced firing warning shots at a Chinese drone over its region.