The treasury stock method counts the net new shares from in-the-money options, assuming the exercise proceeds buy back shares at the current price.
Net new shares = options × (1 − strike price ÷ share price), for options with strike below price
It produces the diluted share count used to turn equity value into value per share. Out-of-the-money options add nothing.