Python: optimal_count now returns a value after calculation.