total count bugfix