$ 0 0 Because you written code SN +=1; means whenever trigger is fired, its increasing. you need to clear