What you are asking about is fondly called the "Five Second Rule". Many children and adults live by this rule meaning if you drop food you have five seconds to pick it up before it becomes a home to dangerous bacteria.
Several experiments have been done in an attempt to validate or disprove this belief. Dawson et al. (2006) found that bacteria can be transferred to the food almost immediately. So, the research indicates that a shorter time on the floor does mean less bacteria but remember it takes less than 100 E Coli organisms to make you sick.
Best advice? Pick it up and toss it into the nearest trash receptacle.