Found it ... ARGH !
when I can use "g" as the variable for my inner lambda expression inside the group becuse it refers to the original group "g". so i changed g=>g.isScheduled
toi=>i.isScheduled
Items.GroupBy(
i => i.ItemID,
i => new { isScheduled = i.isScheduled },
(key, g) => new ItemStatistics()
{
ItemID = key,
ScheduledItems = g.Count(i=>i.isScheduled),
UnscheduledItems = g.Count(i=> !i.isScheduled)
}).ToList();
and now everything is okay