Private residence relief: periods of absence: no other residence
CG64470 explains that only residences in which the individual holds a legal or equitable interest qualify for relief under Section 222. Residences occupied under licence are not within Section 222 and are not eligible for relief. So they should be ignored in deciding whether there is a qualifying period of absence.
A residence occupied under a tenancy or otherwise owned may be eligible for relief. But a residence is not eligible for relief if a nomination has been made under TCGA92/S222 (5)(a) in favour of another residence. So any question of eligibility may be resolved by a timely nomination in favour of the residence from which the individual is absent. CG64495 gives an explanation of the time limit for a nomination.
A residence may still be eligible for relief even though, in the year it is disposed of, its owner is neither resident nor ordinarily resident in the United Kingdom and so is not chargeable to Capital Gains Tax in that year. Whether or not a residence is eligible for relief is governed by the private residence relief legislation of TCGA92/S222-TCGA92/S226. The status of its owner is irrelevant.