Measuring Volumes by Counting Cubes