If you have the vote to delete privilege (part of the "moderator tools" privilege) (10k rep on launched sites, 2k on beta sites), you get five votes to delete per day, plus 1 vote per 1000 reputation points above 10k (up to a maximum of 30 votes per day). Votes to delete your own posts may or may not count toward the limit, depending on circumstances.
You get as many votes to undelete as votes to delete.
Votes to delete or undelete never expire.