In counties of less than 500,000 inhabitants the cost of the examination required by Section 4 is a charge against and shall be paid out of the general fund of the county in which the proceeding is brought.