iPhone is losing sales because a couple of reasons. 1) It lost its "cool" factor. The public wants the next new thing and the iPhone platform is getting pretty stale. All they are doing is refreshing the product. There is no revolutionary change in it. Apple just expects to be able to slap some cosmetic changes on the device and then charge more than everyone else for it. WP8 phones are brand new. They have cool factor because they are a great product and it is new. People want something brand new when they spend money not something stale.
2) Apples decision to build a new connector into the iPhone just made a bunch of devices that iPhone 4 users have bought useless. I know iPhone (Apple fanboys) who have told me they are sticking with their 4 and 4s's because they dont' want to upgrade all the little devices that bought that use the old connector. Yes you can buy an adapter but it doesn't look cool hanging off your iPhone.