  Fermionic formulas in combinatorial Bethe ansatz consist of sums of products
of q-binomial coefficients. There exist refinements without a sum that are
known to yield partition functions of box-ball systems with a prescribed
soliton content. In this paper, such a refined fermionic formula is extended to
the periodic box-ball system and a q-analogue of the Bethe root counting
formula for XXZ chain at $\Delta=\infty$.
