Whenever judgment is rendered for any such penalty or forfeiture, a writ of execution may issue in favor of the county for the penalty and costs.