according to this graph:
there are roughly 6000 tor nodes (relay+exit combined) up and running.
As soon as an attacker controls all 3 nodes randomly selected for the tor route ( entry -> relay -> exit ), the anonymization process is in vain.
So, let's say the NSA rents 6000 servers, hence they now control 50% of the tor network and have a high chance on breaking many communications.
let's say an average server costs them 50$ a month, that would be 300K USD per month, which doesn't seem too much money for the biggest intelligence service.
Of course it would be pretty obvious to just double the amount of tor nodes within like a month, but let's say have been doing this gradually for a couple of years now, and control 50% of the 6000 nodes RIGHT NOW.