spark streaming codes for rolling count calculation