Autocomplete: Sort StopArea by StopPoint count

For each StopArea calculate the number of StopPoints.
Using maximun number of StopPoints, calculates score
of each StopPoints from 0 to 100.
I think there is a problem with this line. don't you want to only check that max_score is not null ?