France became the first nation to decriminalise homosexual activity in 1791. The Netherlands did so in 1811 and Brazil in 1830. A few more countries followed suit, but it was not until the sexual revolution of the 1960s and the 1970s that decriminalisation of homosexuality gained steam.
Out of 195 independent countries in the world today, 128 have decriminalised homosexuality. But progress on gay equality has not been uniform. Homosexuality remains illegal in over 60 countries, with some regions, such as the Middle East and Africa, lagging behind the rest of the world.
Source: Human Progress