As the longstanding political maxim goes, the first rule of being a party whip is knowing how to count. There will be a lot of totting-up of votes this week as MPs consider Boris Johnson’s Brexit deal and a series of possible amendments to it.

There are 650 MPs in the Commons, but with the seven non-sitting Sinn Féin representatives, as well as the Speaker, John Bercow, and his two deputies not taking part in votes, the magic number for any victory is 320.

After byelection losses, expulsions and resignations, Johnson’s Conservatives hold 288 seats, meaning that even with the 10 Democratic Unionist party (DUP) members backing the government – which they are not doing on the deal – he is some way short. However, Labour is also divided and there are now 35 independent MPs, making the situation very fluid.

Here’s how the numbers might look for various options.

Johnson’s deal

Ministers are hopeful that if they are given a free run at pushing through Johnson’s plan – when they tried to do so on Saturday, it was amended to delay the moment of truth – the numbers will be there.

Current projections put the vote at a dead heat. Johnson’s side is boosted by 20 former Tories who now sit as independents but are supportive, and various other independents including Brexit-minded former Labour MPs such as Ian Austin and Frank Field.

The key will be how many current Labour MPs the government can tempt over. On Saturday, six voted with the government against Oliver Letwin’s amendment to delay approval of Johnson’s deal – Kevin Barron, Ronnie Campbell, Jim Fitzpatrick, Caroline Flint, Kate Hoey and John Mann. They could all be expected to back the deal.

The question is whether any more Labour MPs, particularly from leave-backing constituencies, could follow. The signs are mixed. One possibility, Gloria de Piero, has said she will instead work to support a customs union amendment.

All-UK customs union

This appears to be the favoured option of Labour, whose hope would be to attach an amendment on it to the Brexit deal legislation. However, the government is vehemently opposed to a customs union and would not accept a deal so amended.

When MPs held non-binding indicative votes in April on a series of Brexit options, a customs union came as close as any to gaining approval, losing by 276 votes to 273, with a number of abstentions.

The numbers could be similarly close now. The combined total of Labour’s 245 MPs, 35 from the SNP, 19 Lib Dems plus 10 from Plaid Cymru, the Independent Group of Change and the Greens gets to 309, short of the magic number.

It is by no means certain the SNP and Lib Dems would support the amendment. Both parties – which actively oppose Brexit – abstained in the indicative votes, and are understood to be waiting to see the specifics of an amendment before they decide this time.

Some of the 20 ex-Tory independents have been sympathetic to a customs union before (the indicative vote on a customs union was instigated by Ken Clarke), but some could be receptive to the government urging to eschew the plan now.

Labour’s big hope had been to get the DUP onside after the party was cut adrift by Johnson with his deal, which leaves Northern Ireland subject to an EU-style customs regime. But on Monday one DUP MP, Jim Shannon, said the party would not back such a move.

Second referendum

The idea of an amendment making any Brexit deal conditional on a second referendum to approve or reject it has been mooted for many months. However, MPs supporting the People’s Vote campaign have repeatedly declined to push the matter, mindful that it probably does not have the required support.

A second referendum proposal during April’s indicative votes lost by 292 votes to 280, and it is uncertain how much more support such a plan could pick up beyond the same MPs who seem likely to support a customs union. In this instance the ex-Tory rebels are notably less sympathetic for the most part.

However, it seems such an amendment will be tabled. Rather than being put forward by the Labour frontbench, the most likely version is one proposed by Peter Kyle and Phil Wilson, two Labour MPs who have repeatedly pushed the idea of any Brexit deal being contingent on a confirmatory referendum.