I am using Python to_sql function to insert data in a database table from Pandas dataframe. 
I am able to insert data in database table but I want to know in my code how many records are inserted . 
How to know record count of inserts ( i do not want to write one more query to access database table to get record count)?
Also, is there a way to see logs for this function execution. like what were the queries executed etc.
There is no way to do this, since python cannot know how many of the records being inserted were already in the table.
Pandas :Record count inserted by Python TO_SQL funtion