from collections import Counter
import re


def count(text_block):
    words = re.findall(r'\w+', text_block.lower())
    return {'quantity': len(words), 'distinct': len(Counter(words))}
7343890a76f34efbbc2c57a1f1c523745a244b7b
<mask token>

<mask token>


def count(text_block):
    words = re.findall('\\w+', text_block.lower())
    return {'quantity': len(words), 'distinct': len(Counter(words))}

from collections import Counter
import re


def count(text_block):
    words = re.findall('\\w+', text_block.lower())
    return {'quantity': len(words), 'distinct': len(Counter(words))}

from collections import Counter
import re


def count(text_block):
    words = re.findall(r'\w+', text_block.lower())
    return {'quantity': len(words), 'distinct': len(Counter(words))}