Maybe they counted urban areas instead of cities. The actual city of Berlin has only about 3,5 Million inhabitants but the answer had more than 4,5. In that case, the Rhine/Ruhr area is the biggest urban area in Germany with over 10 Million inhabitants, but it consists of several smaller cities that grew into each other.
Johannesburg?
Sydney?
Istanbul?