10K complete nodes enough to bitcoin to avoid an attack of 51%?

As I know, Bitcoin has about 10,000 complete nodes. And the question that arises to me is this: this number is not huge! If any one has 6K servers, can control the bitcoin via 51% attack?

I thought that if Bitcoin had millions of nodes, everything was fine, but 10K is enough? What is the magic here that people trust Bitcoin with 10K nodes?