What is the difference between "three of them" and "the three of them"?
In the first case you are simply counting them, in the second case you are using the group of three people either as an object or subject in a phrase.
I collect cars; I have three of them.
The friends always stuck together. The three of them went to school together.
Using the article or not can change the meaning of the sentence considerably:
The Johnson brothers lived together. The three of them joined the army.
There are three brothers, and all of them joined the army.
The Johnson brothers lived together. Three of them joined the army.
There are at least four brothers. Three of the brothers joined the army, but al least one stayed at home.
"The three of them" means "from a set of 3 elements, you take all. (i.e. you have a, b and c, thus 'the three of them' would be the three letters a, b and c).
"Three of them" means "from a set of more than 3 items, you get any given combination of 3, whichever (i.e. you have a, b, c and d, thus 'three of them' would be abc, but also bcd, and abd, and acd. Any of those sub-sets would match the 'three of them' concept.