Calculating costs more correctly, sicne countEdits hates 0 length inputs
CountEdits didn't actually hate 0-length inputs, but now we can be a bit smarter about them.