Counting illegals is not possible under the Census currently or in any point in the future most likely
https://www.law.cornell.edu/uscode/text/13/9
https://www.census.gov/topics/population/foreign-born/about/...
So unless you're willing to also say that counted illegals cannot used for either of those, then you're just being obtuse.
But if we can agree that they cannot be used for that then sure, lets identify and count them. If we can't identify (make non-private) and count them then why should we trust that those counts are accurate?
You're trading a chance of accuracy (good faith handling of data) for a guarantee of non-accuracy