A public school shall be maintained in each school district in the county at least four months during each scholastic year. A school district neglecting to maintain its school four months, shall be entitled to only such part of the free school fund as may be required to pay the teacher for the time actually taught.