Onavo, the VPN app-company that was repurposed by facebook for market intelligence, was only acquired in 2013, Instagram was acquired a year earlier in 2012.
But before 2013 there were methods on both iOS and Android for an App to get a list of all OTHER installed apps on the device.
Facebook had the means to know exactly at which rate each app was growing and how many of the users they have to share with it, the facebook app itself was gathering this info.
They could gather enough data to even calculate how much user-attention they lose after each app is installed on a users' device.
--
Onavo was then acquired in 2013, right when Apple started to lock-down those app-scanning methods with iOS7.
So it appears that the company was acquired to be able to KEEP doing something they have already been doing before that with the facebook app.