Fix count-frames.