def count(tex):
<EOL>soup = TexSoup(tex)<EOL>labels = set(label.string for label in soup.find_all('<STR_LIT:label>'))<EOL>return dict((label, soup.find_all('<STR_LIT>' % label)) for label in labels)<EOL>
Extract all labels, then count the number of times each is referenced in
    the provided file. Does not follow \includes.