Rousseau agreed with the idea of THE SOCIAL CONTRACT. (Indeed, that's the title of one of his most famous books.) The idea of a "social contract" is that the people agree to give authority to a government in order to make their lives in society better.
In his social contract theory, Rousseau insisted that that the PEOPLE of a nation are SOVEREIGN -- meaning that the people are always the ones who are to be deciding matters for their own society. Rousseau famously asserted that the "general will" of the people is always right. Some have criticized Rousseau's approach as promoting an unworkable view of government run completely by democratic referendum. But if you read his famous book, The Social Contract, you'll see his view of the "general will" is more nuanced than that. It isn't just a majority ballot sort of thing. For instance, in the 2016 presidential election in America, the "general will" that was most expressing itself was that the country wasn't greatly happy about either candidate running for the office of chief executive of the country. If Rousseau's "general will" principle had been put into action, the nation might have called for a new round of nominations to produce a candidate that could have pulled the nation together rather than divisive candidates and parties pulling the country in opposite directions.