I'll note that changing IndexSummary to consider a byte size instead of number of keys is relatively straightforward. I'm attaching an incomplete patch that does that part.
However, one problem is that we currently use the index summary for different estimate of number of keys in the sstable. And in particular, we need to estimate the number of keys given a range of tokens, which means simply keeping the total number of keys in the sstable is not enough.
The simplest/cheapest solution I can see for that problem would be to add to the IndexSummary a new int to keep how many key each sample covers (since it's not constant anymore). That does mean breaking the format of the serialized indexSummary however, but that may in turn be fine if we get this in 1.2 (since index summary aren't save before that). If someone feels like completing the attached patch with that idea, feel free to (I can find other ways to entertain myself).