This is as expected
you create 2 records with the same title, so the occurrence count of the title would be 2
when you inset the first one, the title occurance count is 0
when you insert the second, the occuerance count is 1
when you update either one, the occurance count now becomes 2
you have not implemented what i sugested in message 2 so that the update will only occur if you make a change to the title