How to use an expression to count intersections in QGIS

The problem is that is not possible to consider the spatial relation intersects between points and lines. Use this expression, that creates a temporary small buffer around the line and applied the count of point inside a polygon.

aggregate(layer:='point', aggregate:='count', expression:="id", filter:=intersects(geometry(@parent), buffer($geometry,0.01)))

To make it working create a "id" field in the point layer and populated it with the field calculator and the expression $id.

This will calculate the number of points intersecting the lines as you request. your result