he sustained several wars against the counts of tolosa