How to get count of bars on screen only (not on chart)?

 
Hi everyone. Does anyone know of a way to compute the bar count of the bars ONLY on the screen, not the total bars on the chart? An alternative would be to get the earliest datetime on the screen only (not on the chart). I'm trying to make a fixed-pip grid indicator that doesn't 'shrink' up when the time on the x-axis is stretched back further into the past. Thanks everyone, Chris