def waldos(soln):
    """Return the number of waldos used by the solution (i.e. that have any non-Start instruction)."""
    return sum(1 for reactor in soln.reactors for waldo in reactor.waldos if waldo)