If you want to look utterly incompetent, infuriate your base, inflame tensions amongst your leading candidates and hand your real opponent a massive win, there's an app for that.

The all-important Iowa caucuses were a debacle.

The party organisers are blaming a "coding issue" in the app, made by Shadow Inc for the Democratic party, that was meant to make it easier to collate the results from almost 1,700 individual caucus contests around the state.

It didn't.

The software failed catastrophically, forcing the caucus captains to phone in the results one by one.

The local secretary of Story County, Shawn Sebastian, described the experience live on CNN, playing the hold music (he'd been hearing for an hour) down the line for millions of television viewers.

By chance, a Democratic party official answered the call on air and then promptly hung up on him.

Loading

It was a metaphor for the night.

The next day, about 18 hours after they were due, just 62 per cent of the results dropped all at once, but the final numbers may not be known for days.

On these incomplete numbers, Mayor Pete Buttigieg appears to be the clear winner.

This should have been a huge moment for Mayor Pete

He secured the most state delegate equivalents, who will ultimately decide on the nomination.

Pete Buttigieg and his husband Chasten greet supporters in Iowa after the caucus count fell apart. ( Reuters: Eric Thayer )

Perhaps even more significantly, in a race where momentum is paramount, he smashed expectations.

He also won precincts from border to border, all over the state.

In the minutes after the first results came through, Mr Buttigieg took the stage in New Hampshire, describing it as "an astonishing victory".

Loading

The openly gay Mayor appeared to choke up a little as he described what it was like to be a kid in a small community "wondering if he belongs or she belongs or they belong in their own family".

"A campaign that started a year ago with four staff members, no name recognition, no money … has taken its place at the front of this race," he said.

The Navy veteran had poured enormous time and resources into Iowa, capitalising on the absence of senators Sanders, Warren and Klobuchar, who were tied up in Washington for Donald Trump's impeachment trial.

It paid off, with a huge number of second-round votes landing in his corner.

That's underlined by the fact Mayor Pete, as he's known, doesn't appear to have won the popular vote in either the first or second rounds.

Bernie Sanders is coming in second in Iowa after Mayor Pete Buttigieg. ( Reuters: Carlo Allegri )

Bragging rights for that go to the 78-year-old senator from Vermont, Bernie Sanders.

But, just like the general election, the popular vote doesn't count in Iowa.

That won't stop Bernie Sanders fans from claiming it does.

Many of his supporters, some of the most passionate and aggressive in the game, are already convinced the 2016 contest against Hillary Clinton was rigged.

Iowa's count calamity hides Biden's humiliation

The result-counting glitch will only play into their anti-establishment narrative, further whipping up the divisions in the party.

Elizabeth Warren is coming in third in Iowa behind Mayor Pete Buttigieg and senator Bernie Sanders. ( Reuters: Brian Snyder )

Elizabeth Warren is placed third and, as a result, remains very much in the hunt.

But perhaps the clearest result was Joe Biden's failure to fire.

He was never expected to win emphatically in Iowa and will likely do much better in more racially diverse states like South Carolina.

Former US vice-president Joe Biden, who has led many national polls, came in fourth in Iowa. ( Reuters: Carlos Barria )

But coming fourth, just a few percentage points above Amy Klobuchar — who beat expectations — is a pretty awful result for such a well-known brand.

Biden's blood loss has been somewhat cauterised by the confusion around the results, which enabled him to claim his own victory of sorts.

"We feel good about where we are, so it's on to New Hampshire!" he hollered before heading to the airport to fly there direct.

And then there's New York's multi-billionaire Michael Bloomberg, who registered so late for the nomination, he wasn't even on the Iowa ballot.

That now looks like a pretty good call because, instead of Iowa, he's been focusing his attention — and hundreds of millions of dollars in advertising — in some of the bigger battleground states that could decide the nomination.

The big winner of the Iowa caucuses may be… Donald Trump

Iowa's caucuses were thrown into chaos when an app designed to count the votes failed. ( Reuters: Brian Snyder )

Of course, the caucus meltdown saw President Donald Trump's Twitter feed light up.

He labelled the Democrat caucus an "unmitigated disaster" pointing out the obvious: if they can't run a relatively small electoral contest, how can they be trusted to run the country.

Loading

In truth, the individual, volunteer-run caucuses went very smoothly.

The ABC observed one of the smaller contests at Moore Elementary School in suburban Des Moines.

Going into the event, this correspondent was more than sceptical of such a chaotic and arcane system of voting, where a head count decides the outcome and, in the case of a tied result, a coin toss.

Loading

But the process was actually pretty impressive.

Representatives for the candidates got to make a final pitch, and even the voters themselves had an opportunity to try and lure other members of the neighbourhood into their corner.

Loading

Members of the local community came together for a few hours to discuss the issues that matter to them.

It made the political process fun and engaging and felt like genuine grassroots democracy in action.

It wasn't the normal sanitised, consultant-driven politics we're all used to.

The caucus system rewards candidates who genuinely engage in local politics, canvassing door-to-door and holding town hall meetings.

If it wasn't for this process, a relatively unknown candidate, like Barack Obama in 2008, may never have become competitive enough to make it into the Oval Office.

Barack Obama's 2008 victory in Iowa catapulted him to the front of the race, and eventually led him to win the White House. ( Reuters: Keith Bedford )

There's now talk that this unique and quirky style of politics could be thrown in the bin in favour of more politics as usual.

That would be something of a pity, but after last night's stuff-up in Iowa, it's hard to make the case to keep it.