add matrixshapes.cpp for counting shapes in an integer matrix