math counting cubes