Why did Florida have to count its ballots a second time? Did every county conduct a recount?  What are the legal guidelines for conducting a recount under Florida law?

Short answer:

Section 102.141(4) of Florida's election code requires a recount of all votes "if the returns for any office reflect that a candidate was defeated or eliminated by one-half of a percent or less of the votes cast for such office."  After the first machine count in Florida, the difference was about .03% way beyond the .5% threshold.  Unfortunately, many counties did not recount their ballots as the law requires.  At least 16 simply verified that the number of ballots cast equaled the number of ballots counted by the machine even though the statute clearly calls for a recounting of ballots.  This practice completely contradicts even Secretary of State Harris's own assertion, as she laid forth in a legal opinion given to Manatee County election officials, that a recount essentially means to count again.  Another 50 or so counties simply ran some or all their ballots back through the machines, but did not conduct a full canvass under 101.5614.  Based on local and national news reports, it appears that only about 10 counties followed Florida's canvassing guidelines to the letter and conducted a full recount including the manual inspection of all ballots not counted properly by the tabulating equipment.  Seven of those counties favored Bush.  These 10 counties used as their legal justification for counting machine rejected ballots, the following provision in Section 101.5614(5).

"If any paper ballot is damaged or defective so that it cannot be counted properly by the automatic tabulating equipment, the ballot shall be counted manually at  the counting center by the canvassing board....No vote shall be declared invalid or void if there is a clear indication of the intent of the voter as determined by the canvassing board."

The fact that so many counties ignored this provision and left uncanvassed ballots that could not be counted by the machines is why the courts are now be asked to consider whether or not to now count such ballots and how should that counting be conducted.
 
 

Additional details:
If you think every county in Florida actually recounted their ballots after election night, then you have been deceived.
According to local and national news reports, numerous counties did not run all their ballots back through the machine.  Rather
than make sure their count was accurate, several simply checked to make sure that the number of votes cast in their county
equaled the number of votes the machine said it counted.  If so, they reported their original results back to the state.

As many as 10 counties definitely ran every ballot back through their machines -- a total of about 2 million ballots containing a
majority of votes for Gore (about 57%).  These rescans turned up roughly 1,700 vote changes (either new votes for a
candidate or removal of votes).  What many people don’t seem to realize is that 10 more counties went beyond rescanning
every ballot and included manual recounts of ballots the machine would not read.  Thus, roughly 800,000 ballots (a slight
majority of which favored Bush) were put through a recounting process that included manual inspections.  These recounts
turned up about the same number of vote changes (1,800), as the rescan-only counties despite processing half as many
ballots.  Considering all the whining about the unfairness and subjectivity of hand counts from Republicans, it may surprise you
to know that seven of those counties favored the GOP candidate.

Even more amazing is the variation in the standards used to determine the “will of the voter” during manual inspections in these
counties.  Some counted ballots with double votes on them if the voter clearly indicated his or her preference by circling a
candidate’s name or listing that candidate in the write-in box.  Other counties disqualified these votes, only counting those with
marks in one circle unreadable by the machine because they were too light or not filled in all the way.  As of yet, no calls from
the Bush campaign to disregard as subjective and unreliable any votes turned up through manual inspection in counties he won.
They have, however, been complaining about the manual recount Gadsden county conducted during the first recount even
though seemed to have applied the same standard as Bush-leaning Polk County.

http://www.latimes.com/news/nation/20001115/t000109544.html

http://www.theledger.com/local/elections/12pore.htm

http://orlandosentinel.com/automagic/news/2000-11-14/ASECellake14111400.html

http://www.nytimes.com/2000/11/11/politics/11REPU.html

http://orlandosentinel.com/automagic/news/2000-11-10/ASECelrecount1111000.html

http://orlandosentinel.com/elections/1110sem.htm

http://orlandosentinel.com/elections/1118problems.htm