How do they collect this data, technically?
There is no way to get hold of a list of installed or runnings apps through the Cocoa APIs (this is in contrast to Android, where you can obtain finite information on apps right down to data consumption).
However, there is a way to obtain all current running processes, using the standard sysctl function[1]. This includes apps that are backgrounded but not terminated. If you are interested someone on StackOverflow has put together some sample code (I haven't verified it, but it looks like it should work)[2].
This is not as useful as it sounds though. You're not getting app metadata, just process names. The developers behind AppMap will presumably have set up a database populated with the most popular apps, but will need to keep this current as more apps come to market.
[1]: http://developer.apple.com/library/ios/#documentation/System...
[2]: http://stackoverflow.com/questions/10141067/running-apps-in-...