People have been searching for planets ('wandering stars') for thousands of years, but the first detection of a planet around another star - not the Sun - was not that long ago. It has been suspected for a long time, but we only know since about 25 years that there actually are other planets orbiting around other stars.
If you take a look at the chart on top, you can see the number of known exoplanets over their discovery date. Usually, 51 Peg b is referred to as the first detected extrasolar planet - that is why I marked it with bold letters. However, it is easy to see that this is not the entire story of the detection of the first exoplanets. Clearly, there were five planets discovered before 51 Peg b - so what's the problem with them?
I guess the problem with these planets was three-fold. First, some people had a hard time believing the data. Especially the early detections by the radial velocity technique were not absolutely convincing because researchers were at the very limits of what their instruments could do. Second, the PSR planets are bodies with low masses around pulsars. Pulsars are neutron stars, stars at the end of their life cycle. This was not expected and many people were wondering whether this could really be a planet. Third, the first two exoplanets detected were huge with masses higher than 10 Jupiter-masses. Again, people were not sure whether this is a planet or not rather something like a 'small star'. In 1995 Mayor and Queloz presented a very clear signal of a planet with half the mass of Jupiter orbiting the solar-like star 51 Peg. This was so convincing that most scientist soon accepted it as the first definitive detection of an exoplanet.
This plot shows you the number of exoplanets per detection technique. The first thing that hits the eye is the huge number of detections by 'primary transit', which is the transit method. Half of the currently known planets were found using this technique. The second-most successful method is the radial velocity method.
In 2014 the number of detections peaks with almost 900 exoplanets found in this year. This is a little bit misleading because most of these planets were already known as Kepler planetary candidates - unconfirmed planets found by the Kepler mission. In 2014 many of these unconfirmed planets were suddenly counted as real planets, not because they actually were confirmed by e.g. detection with some other method (preferably RV), but based on a statistical argument. The short version of this argument is: Kepler planetary candidates with some specific properties (e.g. being part of a multi-planet system) are virtually always real planets.
It is interesting to see that the number of exoplanet detections seems to go down. The number in 2015 was lower than 2011, 2012, and 2013. This is certainly no real effect in the sense that there are no more new planets to be found out there. It rather reflects the fact that large, successful missions to find transiting planets, like CoRoT and Kepler, have ended and less data is obtained. Although there certainly will be new instruments dedicated to detect new exoplanets, with a number of more than 2000 known exoplanets the focus will probably shift to missions characterizing a selection of particularly interesting exoplanets in detail.
When presenting each detection method separately, we can see better how the number of detections is developing for each technique. The only method I do not show here is the astrometry technique which - according to exoplanet.eu - only has one detection.
The numbers coming from the RV method are more or less constantly rising since the 90s. Although it is resource intensive because one needs large telescopes and highly RV-stabilized spectrographs, this is our most important technique to detect the mass of exoplanets. Getting high-resolution spectra of the exoplanet system also helps analyzing other properties of the star and the planets.
After the detection of the first extrasolar planetary transit in 1999, most of the transiting planets came from Kepler from about 2010 on. Although the transit method is comparatively simple, the numbers go back since the Kepler main mission is over (and K2 is not obtaining as much and as good data). Data from ground is just not as fruitful, although it is producing a lot of results.
The numbers for microlensing and imaging are rising since about 2005. I hope this will continue because it is very good for our statistical understanding of exopanets; these methods probe different properties than RVs and transits, e.g. planets far away from their host stars, which will help to understand better how many planets there are, where they are, and what characteristics they have.