This is sort of a complicated situation/question, but I'll try to explain it the best I can.
I am currently studying in Germany and I have a student visa and residency permit. I arrived March 30, 2010 and will officially be leaving Germany August 30, 2010. I have a visa good for my entire stay in Germany and I was told as a US citizen I also get 90 days outside of Germany within an 180 period under the Schengen visa.
I am travelling to Greece for five weeks (I will return to Germany for one day and go to the US from there before my visa expires), and I was also in Greece 8 days at the end of May. That would be 44 days outside Germany, which clearly does not exceed the 90 days. My concern is actually about the time I spent in Germany before they actually gave me the student visa. I didn't go get the visa/residency permit until about a month and a half after I was in Germany. So my current visa/residency permit says May 17-Sep 1. Does the time I spent in Germany before May 17 count as days under the Schengen visa since I technically didn't have the visa in my passport yet? If those days are counted, I am worried after I spend my time in Greece it will exceed the 90 day maximum.