Postgres Get Count Arcpy Create