I'm not convinced that SE activity measures difficulty. But it certainly is affected by much more than just popularity. I could imagine it measuring the total API surface, as you can ask more questions about larger subjects.
It's certainly a deeply flawed measure, but then pure search engine hits like TIOBE are likely much worse.