added the code for retrieving data using PDO and row count