Fixed logic in count_logs to allow status to be changed.