add seperate countMoves

although code is duplicated, it feels easier to read. Not sure why but
getting ~1% speedup too.