Using a variable to delete movie clips

k in my platform game i have an enemy to shoot at and after getting hit three times i want him to disappear so i tried to make a variable called health and on the hittest add one to it then under that code i put if health equals three to remove the clip but it doesn’t work.i also need help on making the enemy shoot so any help would b great.