A PHP implementation of the DGIM algorithm to count a stream of ones in a window.