Fix count command bug