Why there are 3 significant figures in 86400 but 5 in 86400 s ( because of Unit) My book states one rule for determining the number of significant figures as under:

All zeroes to the right of a non zero digit but to the left of an understood decimal point are not significant . Eg. 86400 has 3 significant figures. 
But such zeroes are significant if they come from a measurement. So 86400 has 3 significant figures but 86400 s has 5 significant
  figures. Also 5100kg has 4 significant figures.

Please explain me whether this rule is correct. Thank you
 A: I have seen this usage before, but it is not a common convention, so if you use it, you should explicitly say so.  The argument behind it is that giving 86400 as a number of seconds implies that the number is precise up to that given unit: if you wanted to express three digits of precision only, you would write $864\times10^2s$, so that you are always reporting your results as an integer number of some units (in this second case, the "units" are $10^2s$).  The much more common convention is to just use scientific notation in the usual way.
That said, as one of the commenters already pointed out, don't read too much into either method, since sig figs are themselves a pretty poor way of representing uncertainty.
A: I have never encountered this usage and I would be skeptical about a source that used it.  You are invited to name-and-shame your text.
Your first example is a little unusual, because $86\,400 = 24\times60\times60$  is exactly the number of seconds in a twenty-four hour day.  So in many contexts you might find yourself using $86\,400\,\text{seconds}/\text{day}$ as an infinite-precision unit-conversion factor.  (Although, since leap seconds are inserted into Coordinated Universal Time at intervals possibly as frequent as every six months, there is a sub-$10^{-7}$ uncertainty in using this conversion blindly for very long intervals in the modern era.)  You might compare to using the speed of light as a conversion factor between lengths and distances, where the value $c = 299\,792\,458\,\rm m / s$ has nine nonzero leading digits but is defined to have infinite precision.
For your second example: if I think about my experience with five-ton objects and the kinds of apparatus that would be typically used to determine their masses (lorries and cranes would be involved), I would be very shocked to measure a mass of $5100\rm\, kg$ with a precision of $\pm1\,\rm kg$.  Heck, it takes several kilograms of lifting hardware to safely attach a five-ton object to a crane.  Without a description of the measurement technique and its calibration chain, I would trust at measurement of "$5100\,\rm kg$" to $\pm100\,\rm kg$, using the regular rules for significant figures.
