The legislation defines terrorism and what constitutes a terrorist act , and outlines procedures for carrying out counter-terrorism operations within and outside Russian territory .