Hi - I think this should work by setting begin/end 
range markers. You can get more info on these functions in the 
helpfile.
 
Bar = BarIndex();
SpanBars = EndValue( Bar ) - BeginValue( Bar 
);
// Display number of bars in Title
Plot( SpanBars, "Span Bars", colorBlack, 
styleNoLine|styleNoLabel );
 
Steve