As far as I can tell, they respawn indefinitely — fighting them isn't the way out. Run along the hall instead and look for the door, where Malak is waiting.
Each droid carries a letter designation, "Droid A," "Droid B" and so on, which suggests the whole set runs to 26, one per letter of the alphabet.