For all the talk of backstops and confidence votes and magic bullets, Brexit has actually shown up how very simple politics is: it’s a numbers game.

Ironically it was Eric Joyce who impressed this upon me a number of years ago. (Ironic because there’s a school of thought that says the fighty ex-Falkirk MP is to blame for Brexit. He punches a Tory leading to a dodgy Falkirk selection battle leading to Ed Miliband’s new rules for electing a Labour leader leading to Momentum takeover, Brexiteer Jeremy Corbyn in charge and a lacklustre Labour referendum campaign that let Leave get over the line.)

Joyce was talking about how he used to “knock down” the Trotskyites in his local Labour party – I think he was talking metaphorically but with Eric you could never be sure – by simply ensuring he always had the numbers to vote them down. But it’s a universal rule.

Brexiteer Steve Baker might style himself a political pirate and organiser extraordinaire, but without 48 backers he looks like a blustering busted flush.

Ten DUP MPs can wield inordinate influence because the numbers haven’t stacked up for Theresa May since the last general election.

The 13 Scottish Tories decided to flex their muscles last week by reminding the PM that they are vital to her survival and they have concerns over fishing in the Brexit deal.

But it’s another group of Scots who may yet be key: the SNP’s 35 MPs.

Their number may be much reduced since 2017, but it’s important in a couple of ways. First of all it’s a big enough cohort to contain varied views even if, in classic SNP style, they act and think as one publicly.

Last week senior members of the group were grappling privately with the possibility of backing Theresa May’s Brexit deal, on the basis that it’s better than no deal. (While most Nats would blanch at the thought of working with the Tories, it’s worth remembering Alex Salmond governed for four years in Holyrood by doing precisely that.) The huge hurdle they couldn’t overcome was figuring out what the PM could offer them for their support short of a second independence referendum. The answer, ultimately was nothing and it didn’t take that long for Nicola Sturgeon to instruct her Westminster members to vote against the deal. However it’s instructive that the wiser Nats were giving the issue some thought rather than kicking against the Tories out of instinct. They are in the mood to do deals.

Hence Nicola Sturgeon flew into London this week for a chat with Jeremy Corbyn.

The First Minister doesn’t like London life in the way her predecessor Alex Salmond enjoyed the capital city’s pleasures. She only goes south if there’s an opportunity for her to get her teeth into. Clearly she feels Corbyn is ripe for a bit of wooing, that there’s a deal to be done.

And she might be right.

For a start he’s extremely equivocal on the issue of indyref2. Repeatedly given the option to rule one out, he swithers, much to the chagrin of the Scottish Labour figures who fought the first independence referendum, and to the delight of Scottish Tories whose revival has largely been built on the territory vacated by Labour since Corbyn put them in the unreliable category of unionist.

No one would be surprised if Corbyn traded the promise of a second independence referendum for SNP support, either vis a vis Brexit or with an eye on coalition discussions after the next general election, whenever that may be.

But Corbyn may not have to go that far. SNP defence spokesman Stewart McDonald, undoubtedly one of the party’s smartest operators, told me in an interview earlier in the autumn that Trident would be on the table in any discussions about working with Labour.

Labour’s shadow defence secretary Nia Griffith is clear that Trident stays, but her words look lame next to her leader’s decades long record of opposing the UK nuclear deterrent. Corbyn joined the Campaign for Nuclear Disarmament at 15, which is also how Sturgeon’s route into politics started. A deal is there to be struck if the two leaders get the chance.

There’s no doubt they could help each other out among the Brexit maelstrom. Sturgeon wants Corbyn to join her in opposing Theresa May’s deal and advocating for the UK to stay in the single market. That outcome would suit Scotland economically and the SNP politically by satisfying both the not insignificant portion of Nat support that wants out the EU in the name of utter independence, but by also pacifying, for now, the larger proportion who want to stay in Europe.

Corbyn has a headache in that he doesn’t like the EU, but most of his party members do. Again a deal that kept the UK in a customs union and the single market would keep the party sweet. Perhaps he could live with it if he could convince himself it was the price to pay for getting a step closer to Number 10 and maybe even through the door. Plus there would be the promise of potentially scrapping Trident once he was there. Surely his lifelong distaste for nuclear weapons would trump his antipathy towards the EU?

And there are plenty of signs that the two parties could work well together.

They signed a letter together this month calling on the motion on the meaningful vote to be amendable.

Channels have long been open between the SNP Brexit supremo Stephen Gethins and Labour’s Keir Starmer, two of the biggest talents on the opposition benches.

There’s plenty among the SNP parliamentary party who are ideologically in line with Corbyn – remember Mhairi Black praised Tony Benn in her blockbuster maiden speech, Chris Stephens, who represents the shipyards in his Glasgow seat, likes trades unions much more than any Blairite ever did.

And the continuing efforts of Scottish Labour leader Richard Leonard to prove himself less effective than a balloon on a stick and take the party to levels of obscurity even the Scottish Tories didn’t delve during their long years in the Scottish wilderness mean that Corbyn has little to lose by selling out the increasingly irrelevant Edinburgh branch office.

Most importantly, a proposal to keep the UK in the single market and the customs union would have a marginally better chance of commanding a majority in the House of Commons than May’s deal looks to have. If Labour and the SNP together have the numbers to put forward a proposal that would have to be taken seriously, the Lib Dems and Plaid Cymru will support them. If they could persuade a handful of Tory Remainers to get on board, then the parliamentary shit begins to get real.

And that is the bottom line.

Politics, after all, is a numbers game.