To look at it another way, lets say we were actually repelling an invasion, and there happened to be 200,000 enemy soldiers in Texas. Would those 200,000 enemy soldiers have to be counted for purposes of the census? I'd say not.
Counting only those present here legally actually makes pretty sound legal sense.
I agree, it makes no sense to count illegals, but I have a feeling the Supreme court will disagree.