Shanghai ranked first among Chinese mainland cities in terms of number of newly opened first stores by domestic and international brands last year and in the first four months of this year, the Shanghai Municipal Commission of Commerce said on Sunday.