According to Wikipedia:
A head count is taken, and the passenger total is recorded as 20. Daniel and Susan decide to separate briefly from the group while underwater. Half an hour later, the group returns to the boat. Two members of the group are inadvertently counted twice, so the dive master thinks everyone is back on board, and the boat leaves the site. However, Daniel and Susan are still underwater, unaware that the others have returned. When they resurface, the boat has gone. They believe the group will soon return to recover them.
Link to article
Plot points from IMDB:
They enjoy it so much they're last to come up, but by then the boat has left, despite the obligatory divers count, which got upset after Seth, who forgot his mask, convinced someone to dive as regulations-required buddy with him.
Link to IMDB
Trivia from IMDB:
This film is inspired by a true story about an American couple, Tom and Eileen Lonergan, who in 1998 went with a scuba group (Outer Edge Dive Company) to an area off the coast of the Great Barrier Reef in Australia. They were accidentally left behind due to a faulty head count taken by the dive boat crew. There were 26 other divers and 5 crew members who failed to notice that the couple was not on the boat. It was not until two days later on January 27, 1998, that the pair was found to be missing after a bag containing their passports and belongings was found in the dive boat. A massive air and sea search took place over the following three days, but failed to find them. The couple was never found.
Link to IMDB trivia
The article about the true story from Wikipedia offers no firm explanation and actually raises a few more questions (that weren't covered in the film) !
The Lonergans were scuba diving with a group at St. Crispin's Reef in Australia's Great Barrier Reef. The boat that had transported the group to the dive site departed before the Lonergans returned from the water. None of the vessel's crew or passengers noticed that the two had not come back aboard.
Link to Wikipedia article