maybe you could change that to ```sum(1 for journey in journeys if journey.type)```

or I think this should work: ```sum(imap(journey.type, journey))``` but seems too criptic AFAIC (and not tested :) )