// query example
echo $db->query("SELECT * FROM users")->rowCount(); // Will return the total member number.
// prepare example
$query = $db->prepare("SELECT * FROM users WHERE user_username=? && user_password=?");
$query->execute(array($username, md5($password)));
echo $query->rowCount(); // Will return the number of columns affected.
// if($query->rowCount() > 0) means there is an user found with given username and password.