table_ --> counts, bugfixes for prepare_package