Alter implementation of CountBoardObjects to fight StackOverflowExceptions (successfully, it seems)