[db] refactor how repo counts are handled

bc47fdca parent 8d7bcbec +905 −260
browse files