According to a piece at Fortune's Apple 2.0 blog Apple has sold 8 million iPhones to date. But that's not an official stat from Apple, it's an approximation based on collected International Mobile Equipment Identity (IMEI) numbers.
According to the IMEIs Apple has manufactured at least 5,649,000 iPhone 3Gs. When you add to that the 2.4 million first-generation iPhones that Apple reported selling in the first six months of 2008, you get a total of more than 8 million iPhones.
With Taiwanese electronics giant Foxconn turning out more than 800,000 units per week, Apple appears to be on a pace to build its 10 millionth iPhone before the end of September.