Counting and full history integrated

Check the corresponding js files for how to get the count. Now it gets
it on the click on a square.