of those only 5 died = only 5 of those died . Those is the object of the prepositional phrase, of those , modifying 5 ; those is at the same time a demonstrative pronoun whose referrent is 22 persons . That's how I see it.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.