It took me some time to figure out, but you can access the logical slide counter using
counter("logical-slide")
(see here).
So counter("logical-slide").update(0)
should do the trick. It does not seem to be officially documented behaviour though, so might be prone to changes.