For example, if there were 99 databases distributed between three sites, the ideal distribution would have 33 databases in ...

For example, if there were 99 databases distributed between three sites, the ideal distribution would have 33 databases in each site. If the allowed deviation is 20%, the script will attempt to balance the databases so that each site has no more than 10% more or less than this number.  10% of 33 is 3.3, which is rounded up to 4 - so the script will attempt to have between 29 and 37 databases in each site.