Python Pandas Count Number Of Rows Postgresql Database Architecture