Sql Server Count Duplicate In Python