(Now an answer by request.)
The arXiv supports the Open Archive Initiative so in principle this is just a programming question for
- Requesting and downloading the data for all articles in Astrophysics and dumping it locally in a usable format.
- Extracting the author information.
- Culling the duplicates.
- Counting the resulting entries.
If the first step is done right (by putting the information in a suitable database format) the other three will be more-or-less trivial.
Note however that name duplication would be a problem that is hard to solve, especially when some articles are listed with a "last name, first initials" format. Similarly authors who use more than one version of their names on arXiv (I'm guilty of that myself) can cause some inaccuracies to the computation outlined above. The mathematicians solve this "manually" by employing 13 people and making this part of their jobs, and I don't know if there can be a good programmatic solution until at least wide adoption of some sort of author ID (like ORCid) system.