Let's start with the original question, which is making some false assumptions.
Riccardo Spagni answered around 80%, which is a lot and an entity like IRS would not be able to get that many keys from actual users.
It's important to clarify 80% of what exactly, as we'll see below.
But what about generating millions of accounts every hour to keep having 80% of all view keys in the network?
Doesn't matter. "Accounts" don't really exist. There's nothing written to the blockchain once you create an "account". Only when you actually receive your first funds, there are some outputs which are controlled by some wallet and which could be used for the mentioned attack.
These generated and otherwise unused accounts would be used for transaction input mixing, right?
Not right. Until you actually receive some funds, there's nothing "yours" on the blockchain to "mix" with.
There are 3 aspects I would like to see answered:
First, we must understand how the attack is supposed to work. Currently, by default, ring signatures are constructed with a ring size of 5 (1 of the signer + 4 other). This means that for any 1 input, there are 5 possible sources, ie 5 possible one-time keys (aka "outputs"). If someone recognizes all those 4 other one-time keys which your wallet picked as his, then to him it will be clear that the remaining 1 is the real one getting consumed.
Obviously, we get 80% based on that. So, if we increase ring size to 10, then the attacker would need 90% and so on. Remember, we're talking about one-time keys. Every Monero transaction generates those as destination and Monero are never sent to the address itself. Each Monero trasaction consumes some existing one-time key and generates a brand new one for the destination. The address is like a blueprint to create those, and the viewkey is a template used to recognize them as belonging to your wallet.
So, an attacker could own just 1 view key, but 80% of the one-time keys used for the input to be able to tell which one is the real one getting consumed. It still wouldn't reveal the owner just like that, but would only trace the funds 1 step back to some other one-time key. If you don't own 80% for the transaction which created that one, it's a dead end and you cant trace back further.
Since your wallet picks those other outputs randomly, an attacker can't plant them in advance. He must instead keep generating 80% of the outputs on the blockchain to uniformly cover 80% everywhere, so whatever your wallet would pick there would be a good chance of picking those that belong to the attacker. Remember, other people are transacting at the same time. So an attacker needs to beat the entire user-base of Monero. For every 1 legitimate output, he must make 4 others. He must pay the fee for it, too! Can you imagine the cost of sustaining such an attack?
We can now answer the 3 points
How likely is such an attack? Is it merely theoretical?
Higly unlikely, as explained above.
However the above is not the full story, as there are other ways to recognize outputs as belonging to some address. You could steal people's view keys which would give you an edge without having to make the transactions yourself. You could coerce mymonero-type services (which keeps user viewkeys) to give up all user accounts, and then all of their outputs would then help you as well. So a situation where 80% of transaction volume originates from mymonero users would be a real danger.
Is there way to detect such an attack?
I guess not really, since we can't ever tell 2 outputs apart. We can't know if some TX is legitimate or if it's been made with the purpose of generating noise. However, the cost of such attack is a good deterrant.
Would increasing the ringsize help? Or would that just gain time?
It would help, yes. And time is really gained just by transacting normally - any legitimate transaction increases the cumulative cost for the attacker so he must try hard to keep up.