A lot. 4.7 million lines of code for the HD player to work on an xbox 360 to be exact. I was glancing the news over at Kotaku and they linked to the xbox team's blog. I have to admit, I'm rather shocked at that number but some what jealous.
There was a lot of stuff they had to use such as GDI (Graphics Device Interface) and MF (Media Foundations) and then help port that code over to the PPC cores which power the xbox 360 from x86 optimized code. And do it all in under a year.
Yup, I'm jealous.