It is accessed by right clicking on a "Stamp" (an asset on the Hidden/Object/Background layer) and choosing "Auto Resize..."
The cursor changes to a cross hair and lets you create a bounding selection box over the "Map" stamp. Once you select a certain number of grid cells (on the image, not MapTool grid cells!) a dialog will open. Here you can enter the number of cells you selected and "tweak" the selection area.
Once you hit ok, it will then resize the image so that one "Map cell" will equal one "MapTool Grid Cell" and also align the image so the "Map Cells" should match the Grid. This is done by adjusting the "Anchor points" so the map will/can still be set to "Snap to Grid".
You are allowed to "tweak" the selection in case your mouse hands are not steady and can not exactly select an area perfectly, or the map is bad or pixelated, etc. A lot of times you may find a map has exact dimensions, eg 2000x1800, so if your select is showing 298 x 302, most likely the grid would be in even multiples and you should change it to 300x300 for better results.
You can resize as many times as you want. Sometimes it may be easier to resize it to blow it up and get it close, turn the MapTool Grid on/off, check things, resize again to fine tune it.
Caveat, not all maps will be perfect. Some maps get skewed or have large grids lines so finding good start/stop points can be difficult. But for the most part, I think it will get you decent results and you can still resize it manually to fine tune.
An example of the dialog can be found here. Feel free to comment or make suggestions on the UI. I also externalized all dialog text so it can be translated to other languages.
Dialog
*POC Video: https://www.youtube.com/watch?v=aaw-_rrBQVI
*Some things fixed, like auto-correction of anchor points for snap-to grid.
*Sorry, I forgot to capture the mouse in the video encoding, so when I was counting the grid with the mouse pointer, you just get static video for several seconds...