properly count outline pixels