Count Unique Python Df Preprocessing