Treadmill running has a much lower impact than running on the asphalt and unlike trail running you don't have to worry about the terrain. Because of this I think that when people run on treadmills they change their form because they don't think about it. That is what I think the posters on here who are complaining about treadmills experienced.
If I maintain the same form on a treadmill that I would outside and put it at a 2% incline for hills and wind I don't see why it wouldn't count. One might think of it as running on a track when there is no wind, you would still count this as mileage. You are applying the same force to the belt that you would to the road it is just easier on your legs.
That being said, I don't want my legs to develop to run well on a treadmill surface I want them to be able to run well on a road or grassy surface so while I will supplement with treadmill running, it wouldn't be smart to use the treadmill for a majority of one's mileage.