For example, consider the following 3x3 grid: grid = [[1,1,1], [1,0,1], [1,1,1]] In this scenario, the shortest route from the top-left corner (0, 0) to the bottom-right corner (2, 2) follows the perimeter of the grid. The cells along the shortest path can be indicated by their indices as follows: [(0,0), (0,1), (0,2), (1,2), (2,2)] Therefore, for this grid, our function should output 5, which represents the total number of cells in the shortest path.