Implemented a counter for the number of collision checks executed.