fix total cases to only include open cases

depends on new version of ctable: https://github.com/dimagi/ctable/pull/44