Your residential status for Income Tax purposes is based on the number of days you spend within India.
If you are a foreign national living within India, you may be considered a Resident Indian for tax purposes, and similarly if you are an Indian living abroad, you might be considered a Non-Resident Indian (NRI).
Typically, if you are in India for 182 days or more during that financial year, you will be considered a resident. There are a few more conditions associated with this