stackcount improvements