You need to open each project item (window = ProjectItem.Open(...)) and
close it after counting its lines (window.Close). Note that opening a
project item does not imply making its window visible (you need an extra
step to make it visible: window.Visible = true).
BTW, if your goal is to count lines of your own projects rather than
building an add-in, my add-in (below) has a nice Statistics feature.

Signature
Carlos J. Quintero
The MZ-Tools all-in-one add-in, now for .NET: http://www.mztools.com
> hellou it's me again ;-)
>
[quoted text clipped - 35 lines]
> thx for help
> //SNAKE