According to Diodorus, Hydarnes had 20,000 men for the flanking mission at Thermopylae.
The mission began after Ephialtes revealed a mountain path that bypassed the Greek position. Xerxes ordered Hydarnes to lead Persian troops along the route during the night, allowing them to approach the defenders from behind. Diodorus gives the force as 20,000 men, making 20,000 the answer to this source-specific question.
Herodotus tells the episode differently in one important respect. He identifies Hydarnes as the commander and says the Immortals were sent along the path, but he does not provide the same explicit total for the detachment. Diodorus, writing later, gives the numerical figure used here. The distinction matters because readers sometimes combine Herodotus’s narrative with Diodorus’s number and treat them as if they were identical testimony.
The outflanking movement succeeded because the Phocians guarding the mountain track were surprised and bypassed. Once the Persian column reached the rear of the Greek position, Leonidas dismissed most of the allied army and stayed with a much smaller force for the final stand.