Means that you and a friend (or a girlfriend) danced for a long time and many times. ''un sacco'' indicates ''molto'', so you could say ''abbiamo ballato molto'', his meaning is same. ''Abbiamo ballato un sacco'' is a sentence, between friends, that express a situation where two persons have danced very much.