handling non-integer total count