Finding indices and number pixels for rectangle shapes

This module will find the indices of rectangle or square shape and count the
  number of pixels in that shape.

These are rectangles, you should be able to compute the area directly with out having to touch every pixel.  To deal with boxes that run off the edge refactor how the slicing logic works a bit in the loop and just make a list of `h * w` as you go through the loop.