Pakistan's military says troops have faced off with insurgents in two separate raids on their hideouts in the country, killing 12 militants.