It shall not be legal in any civil suit for the clerk of any district court to tax in favor of the prevailing party the costs of more than four witnesses, unless the court shall certify upon the record that the attendance of more than four witnesses was necessary in the case.