Costs against state or county.
In all actions prosecuted in the name and for the use of the state, or in the name and for the use of any county, and in any action brought against the state or any county, and on all appeals to the supreme court or the court of appeals of the state in all actions brought by or against either the state or any county, the state or county shall be liable for costs in the same case and to the same extent as private parties.