I think a majority of mergers 'just happen' because they are not challenged. To stop a merger, some regulating body needs to hear about it and take action in time. They can also investigate and dismantle monopolies after the fact, but then we see long legal battles.
Also size-based limits would be hard to create/enforce. IBM has about 350K employees wordwide. McDonalds has about 200K. Google has about 100K. Amazon 1.1M. Do you look at market cap? The industry specifically?
It's a complex problem, that's why there is no simple solution.