from typing import Counter


def ast_frequency_dist(seqs, discard_first=0):
	"""
	Distribution of asteroid frequencies.
	List of (x, y), where:
		x: number of sequences (among `seq`) that contain a given asteroid;
		y: number of distinct asteroids with that level of occurrence.
	Optionally discards an initial sub-sequence of asteroids that may
	necessarily repeat across sequences (`discard_first`).

	Examples
	--------
	>>> ast_frequency_dist([(1,2,3), (3,4,5,6), (1,3,4)])
	[(1, 3), (2, 2), (3, 1)]
	# 3 asteroids appear in only one sequence, 2 in 2, and 1 in all 3 (ast. 3)
	"""
	ast_freq = Counter([a for s in seqs for a in s[discard_first:]])
	return sorted(Counter(ast_freq.values()).items())