count number of robot unique paths trough the grid