fixed counting

use tmpW*tmpH/maxHole