Sql Query Count Rows In Python