counting implemented (for use in lectures and GameWinnerDetector)