Measure volume by counting unit cubes