In QGIS I create some lines that cross three polygons. By using intersection, it will create a new shapefile that gives me as a result the lines inside the three polygons.
If I open the attribute of the intersection layer I can see that different line ID have same polygon ID (obviously because multiple lines cross the same polygon). By looking I can tell how many lines are inside a polygon but how can I do this automatically?
I would like to modify the polygon layer attributes by adding a new column with the number of lines crossing each polygon (so the polygon layer will have only two column: "ID" and "number of lines").