Write out n_scans to scan_count
Write out n_scans to scan_count

Contributes to issue CURA-3491.

alephobjects/CuraEngine,alephobjects/CuraEngine,ROBO3D/CuraEngine,alephobjects/CuraEngine,ROBO3D/CuraEngine,ROBO3D/CuraEngine,Ultimaker/CuraEngine,Ultimaker/CuraEngine