Rule help to trigger if value repeats a certain number of times

Actually I’m referring to this thread, which is a holding place until I can get these included as part of the OH 2 documentation.