There is no way to tell where slicers have changed layer, so we compute them from viewing gcode. Rule for new layer is different z height with extrusion. Does your code contain code that would e.g. add z-hop and extrude extra filament on the high z?
If you can, please offer such a gcode as download for inspection with the layer count from slicer.