The Army Corps of Engineers provides instructions on how to build a sandbag levee correctly. The guidelines also include a chart on how many sandbags you will need:
US Army Corps of Engineers Sandbagging Brochure
US Army Corps of Engineers Sandbagging Technique video
USEFUL TIPS: Fill sandbags ½ to 2/3 full. Do not fill the sandbags to the top because they are too heavy to handle safely and they will NOT seal properly between layers.Tie the sandbag with enough room for the sand to lay flat and provide an adequate seal between layers of sandbags. Placing plastic sheeting between the layers of the sandbags and wrapping it around your sandbag levee offers the best protection from seepage through the levee.
1 foot of height per 100 foot of length =600 sandbags
Rule of thumb Width 3X (times) the height