Binary counter

Ok I'm officially stumped on how to set up a counter for binary point.
I'd like to count up the number of times a binary point is in true stat (True Starts in Stats??)
I been through the forum looking at the topics around some of these similar enquiries but everything I've tried is not working.Any suggestions appreciated.

Hi Pikey
I believe the true starts in the point statistics is what you looking for. Any reason why it is not?

Hi Pikey4,
The "starts" member reflects how many times the point value was logged in the state in the period the statistics are over (so consecutive polls of 'true' if logging all data will be multiple starts). If there are no samples in the period but there is a start value, the starts will show as 0 despite it being true for the whole period. In that sense the proportion may most clearly resemble what you're trying to look at. But, you could certainly figure out from the
stats.startValue
if it was true at the beginning.var stats = p.past(MINUTE, 5); //binary point print( stats.get(true).starts ); print( stats.get(true).proportion );