more fixes to getlantern/lantern#488 : counters

@aranhoide can you review this set of changes to see whether it makes sense to you?