Friction and work function oscillatory behavior for even and odd number of layers in polycrystalline MoS2