Thats an impressive number of units :o
yes the first. objective tracking, hp/damage calcs, unit pathing, targeting and movement is all done with glsl shaders on the gpu. since a gpu has thousands of cores it can move and update all 3 million units in parallel in a single frame. So the main limiting factor is something called register pressure.