You count the time they spent at school as time they spent living with you.
https://www.irs.gov/publications/p501/ar02.html#en_US_2016_publink1000220898
Temporary absences.
Your child is considered to have
lived with you during periods of time when one of you, or both, are
temporarily
absent due to special circumstances such as:
Education,