I'm keeping the property "customVersion" on jcr:content node. On Version modification its properly incrementing but on restore the Event is getting triggered twice and its incrementing the value on the restored version instead of latest or current value.
In OOTB, versionHistory is properly creating the version and maintaining the sequence.
Can anyone suggest any solution for it to distinguish the Event for Restore or how OOTB versionHistory works.
Can you please add some info/code snippet about the event listener code? I can think of a possibility that within the path that you have mentioned eg /content/dam/folder the change jcr:content of the particular asset would trigger the listener but if there is any property change in any other property within that or based on the type that is mentioned, it could still trigger event again.
However, since you are looking to add a customVersion property for a change detected in publisher, you must be doing this in all publishers for any asset activation or haveing to sync this in remainign publishers (might have to check if this is/may be happening for content fragments as well). An option you can try is using a Preprocessor - Check whether the appropriate asset is being activated, if its applicable, set the customVersion property and save, the replication will automatically set the desired versions in all publishers.