Astronomers have discovered nearly 6,000 planets beyond our own solar system. Here's how — and how we'll find even more.