select U.id as id, U.Descripcion as Descripcion,(select count(E.id) from Elementos E where E.id_Ubicacion=U.id) as Numero from Ubicaciones U where U.descripcion like '%{filtro}%' order by {orden}; Relación de Ubicaciones