First, we need to filter your source stream to get a stream of x1 events.
var x1Stream = from e in sourceStream
where e.ItemId == "X1"
select new {e.ItemId, e.Timestamp}
Next, we need to filter your source stream to get a stream of non-x1 events.
var nonX1Stream = from e in sourceStream
where e.ItemId != "X1"
select e;
Now we'll join the x1 event stream with the non-x1 event stream to get a list of all the non-x1 events that occur during an x1 event.
var x = from l in x1Stream
from r in nonX1Stream
select new {l.ItemId, l.Timestamp, r};
Getting a count of the non-x1 events that occur during an x1 event will require some kind of HoppingWindow to be able to actually count the events in the stream over a fixed period of time. You can also call ToEnumerable() to be able to do the grouping without a window.
var y = from e in x.ToEnumerable()
group e by new {e.ItemId, e.Timestamp}
into g
select new {g.Key.ItemId, g.Key.Timestamp, Count = g.Count()};