Universal features of counting statistics of thermal and quantum phase slips in superconducting nanocircuits