How to programmatically detect how many posts are displayed per page?

The option is appropriately named posts_per_page. FYI you can see the value of options in your database by visiting wp-admin/options.php.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)