Number of jail inmates cut as magistrates battle causes of c