Limiting Amount of Posts in a Custom Post Type again

Your array phrasing is wrong, cange

$count_posts = count(get_posts(array('author'=>$current_user->ID,'post_type','newpages')));

To

$count_posts = count(get_posts(array('author'=>$current_user->ID,'post_type' => 'newpages')));

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