The question is, how many are out there illegal?
What does that question even mean?
You're playing the anti word game of using a word but not defining it, so you can make it mean whatever you want it to and let people make any assumption they want.
Very very few guns in this country are originally "illegal". Nearly all are lawfully manufactured and sold. This country has practically no history of arms being smuggled into the country for resale. Very very rare, extraordinarily rare.
So what does "illegal" mean if they were all originally manufactured and sold according to the law?
Is a stolen gun "illegal"? No, it's stolen property, but it came into existence in a legal way. If it were to be recovered by the police it is the property of the owner from whom it was stolen. Hardly "illegal".
An AR15 bought legally in one state and smuggled into a state with a ban. Illegal gun? Eh, illegal possession maybe, the gun would be legal else where.
Straw purchases, are those "illegal" guns? Well since they were sold to someone who met all the legal requirements for purchase then no, those can't be "illegal" guns either. The purchaser may a criminal but, again, the gun came into being in a legal manner.
A homemade gun? Well, those are legal too.
Maybe a non NFA automatic weapon, maybe a sawed off shotgun or rifle that's not in the NFA books. VERY rare things.
So what is an "illegal" gun?
That term is meaningless and used to confuse discussions like this.
So an honest answer to your question, without any BS, is that there are almost no illegal guns in this country.