You may become a tax resident of Pakistan if you spend 183 days or more in Pakistan during the tax year. Pakistan’s normal tax year runs from July 1 to June 30. An additional residency test may apply if you spend at least 120 days in Pakistan during the tax year and at least 365 days in total during the four preceding tax years; this additional test is not calculated by this rule.
https://www.fbr.gov.pk/section-82/152702
Pakistan Tax Residency
183 days in the tax year