WhatsApp had a surprisingly small number of engineers upon acquisition - around 50 or so?
Whatsapp had 35 engineers for 450M users at the time of its acquisition by FB (2014). It had 50 engineers for 900M users (2015).
https://www.wired.com/2015/09/whatsapp-serves-900-million-us...
Just handling the ads, both backend and user interfaces for buyers, would quickly net you several more developers.
It's easy to have only 45 engineers when you constrain the scope of what they have to do very well, but the scope was much, much, much smaller than Twitter's.
In case you haven't noticed, twitter has many, many, many other features beyond direct messaging, each of which requires its own team to maintain, and many of which are far more complex than a messaging client.