You can use the Field Calculator to create a new field in your line layer using one expression that counts the intersections.
Open the Attribute table of your line layer. Click in the Field Calculator icon
This will open a new window: here you can use create a new field (numeric, Whole integer, 10 of length) and use the following expression
This will create a new field with the count of how many quadrants of the grid each line is intersecting.
Not completely sure about your request: if you want to know the total of the grid quadrants intersected by the lines you can use the same system with this slightly different expression:
aggregate(layer:='Grid', aggregate:='count', expression:=$id, filter:=intersects(($geometry), geometry(@parent))))
This is the result of the second expression:
Probably not the best visualisation to show but I hope it is a good example to show you the result.