Is this what your looking for?
SELECT LG.id_lg,
LG.name,
SUM(LGL.type_of_hour) AS sum_of_hourtypes
FROM LG AS LG
JOIN LineLG AS LGL
ON LGL.id_lg = LG.id_lg
GROUP BY LG.id_lg,
LG.name
ORDER BY LG.name
or this:
SELECT LG.id_lg,
LG.name,
COUNT(LGL.type_of_hour) AS count_of_hourtypes
FROM LG AS LG
JOIN LineLG AS LGL
ON LGL.id_lg = LG.id_lg
GROUP BY LG.id_lg,
LG.name
ORDER BY LG.name