Added function getNumNodes() that will return number of nodes in a 2D array. Also added two asserts for that function