This chapter of the Manu Smriti gives the numbers of days of impurity for different relatives who live near the deceased:
When (a child) dies that has teethed, or that before teething has received (the sacrament of) the tonsure (Kudakarana) or (of the initiation), all relatives (become) impure, and on the birth (of a child) the same (rule) is prescribed. It is ordained (that) among Sapindas the impurity on account of a death (shall last) ten days, (or) until the bones have been collected, (or) three days or one day only. But the Sapinda-relationship ceases with the seventh person (in the ascending and descending lines), the Samanodaka-relationship when the (common) origin and the (existence of a common family)-name are no (longer) known.
The rules for relatives living far away are given later in the chapter:
The above rule regarding impurity on account of a death has been prescribed (for cases where the kinsmen live) near (the deceased); (Sapinda) kinsmen and (Samanodaka) relatives must know the following rule (to refer to cases where deceased lived) at a distance (from them). He who may hear that (a relative) residing in a distant country has died, before ten (days after his death have elapsed), shall be impure for the remainder of the period of ten (days and) nights only. If the ten days have passed, he shall be impure during three (days and) nights; but if a year has elapsed (since the occurrence of the death), he becomes pure merely by bathing.
A man who hears of a (Sapinda) relative's death, or of the birth of a son after the ten days (of impurity have passed), becomes pure by bathing, dressed in his garments.
If an infant (that has not teethed), or a (grownup relative who is) not a Sapinda, die in a distant country, one becomes at once pure after bathing in one's clothes.
If within the ten days (of impurity) another birth or death happens, a Brahmana shall remain impure only until the (first) period of ten days has expired.
They declare that, when the teacher (akarya) has died, the impurity (lasts) three days; if the (teacher's) son or wife (is dead, it lasts) a day and a night; that is a settled (rule).
For a Srotriya who resides with (him out of affection), a man shall be impure for three days; for a maternal uncle, a pupil, an officiating priest, or a maternal relative, for one night together with the preceding and following days.
If the king in whose realm he resides is dead, (he shall be impure) as long as the light (of the sun or stars shines), but for (an intimate friend) who is not a Srotriya (the impurity lasts) for a whole day, likewise for a Guru who knows the Veda and the Angas.
A Brahmana shall be pure after ten days, a Kshatriya after twelve, a Vaisya after fifteen, and a Sudra is purified after a month.
Let him not (unnecessarily) lengthen the period of impurity, nor interrupt the rites to be performed with the sacred fires; for he who performs that (Agnihotra) rite will not be impure, though (he be) a (Sapinda) relative.