This question was put on hold as off-topic because:
"...it appears to be a mathematics problem, as opposed to a mathematical puzzle." However, it is not a mathematics problem. There is no known mathematical solution. As one of the commenters already realized, the puzzle is to find a more efficient counting algorithm (likely using some coding language).
The goal is to find a counting algorithm that is better than simply recursing through every possibility, which will take a very long time. My implementation does it in just under 30 minutes, but I am very sure that other people can do it faster.
Below is a grid of the flags of the 70 countries with the largest population, in order from left to right, top to bottom. Both the upper left cell (the blue star) and the lower left cell (the green smiley) aren't flags. The flags don't serve any purpose for the question, other than to make the grid prettier, and drop some knowledge about population size by country.
You must find the total number of paths that meet all of the following conditions:
Each path must
1. start in the blue star cell
2. end in the green smiley cell
3. visit each of the 70 flags exactly one time
4. move up, down, left, or right, but not diagonally
Here are a couple examples of valid paths: