Harvard University was ranked the best school globally among 2,165 colleges and universities from 90 countries.