Only the first is correct. However, if you want to use just "did," you could re-arrange the words: You did how many surgeries in medical school? This would normally be used when seeking a clarification or confirmation (the bold words would be emphasized verbally): Jack: I did a dozen surgeries at Hopkins.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.