add optimize counts feature, and update README