Can any person be a resident of more than one country
Yes, a person can be resident of more than one country.
If you are a resident of India as per the provisions of Indian income tax act then it does not mean that you will be treated as non resident for other countries. Different countries have different set of income tax act and rules. If after becoming a resident in India you have been treated as resident of some other countries then you have to go by that country’s income tax provisions.
You can check if that country has a doubt taxation agreement with us. If we have a DTAA then you have to pay income tax according to that.
It’s the responsibility of the individual to proof his residential status to the assessing officer. You have to place all relevant records before the assessing officer to prove that you are a resident or non resident
I am from USA and I have visited India to see my grand parents. I have never visited India prior to that. I was in India for 5 months. Will I be treated as a resident under income tax act?
No, one of the exceptions to the residential status rule is that;
If an Indian citizen or a person of Indian origin who comes on a visit to India during the previous year then he/she will be considered as a resident if their stay in India is 182 days or more during the previous year.
A person will be treated as Indian origin if he/she, or either of his/her parents, or any of his/her grand parents was born in undivided India.
As you said you have visited India to see your grandparents, we are assuming that your grandparents are born in India. If they are born in India then your stay will be considered as 182 days and as such you will not be treated as resident under income tax act.
To calculate the stay period for residential status determination will I be considering the day of leaving and arriving in India?
Yes, the day of arrival and day of departure will be considered for the calculation of stay in India. however if you have evidence to proof your stay in number of hours then you can calculate total number of hours and divide it by 24 hours to arrive at number of days. But please remember you have to provide evidence to prove the stay is hours. You can provide your passport copy, airline ticket invoice and boarding pass copy as a proof of your arriving and departure from India.