Counting Bars

 
Is there a way to count the number of bars since a position has been opened?
 
 
Thank you.