calculates number of unique board states and unique ending boards