def count_at_centroid(line_geometry, trajectories_gdf):
    """
    Given a LineString geometry, it counts all the geometries in a LineString GeoDataFrame (the GeoDataFrame containing GPS trajectories).
    This function should be executed per row by means of the df.apply(lambda row : ..) function.
        
    Parameters
    ----------
    line_geometry: LineString
        A street segment geometry
    tracks_gdf: LineString GeoDataFrame
        A set of GPS tracks 
    
    Returns
    -------
    int
    """
    
    intersecting_tracks = trajectories_gdf[trajectories_gdf.geometry.intersects(line_geometry)]
    return len(intersecting_tracks)