how many groups have fought in wars where ansar al-sharia fought too ?
SELECT DISTINCT COUNT attr_open var_uri attr_close where brack_open dbr_Ansar_al-Sharia_ attr_open Derna,_Libya attr_close dbp_battles var_x sep_dot var_x dbp_combatant var_uri sep_dot var_x a dbo_MilitaryConflict brack_close