The West Midlands , which contains the large city of Birmingham was the second-largest county with 2.9 million inhabitants , followed by Shropshire and then West Yorkshire with populations of 2.8 and 2.3 million respectively .