Wrong result when checking if an email address exists in the database

I have database with table ‘users’ which does not contain any records. I want to check if an email address exists.

When I apply query SELECT COUNT(user_id) FROM users WHERE email = 'mm@mmm' in phpMyAdmin, result is ‘0’.

When I use code below in a file, result is ‘1’, although table does not contain any records.

$sql = 'SELECT COUNT(user_id) FROM users WHERE email = :email';
$query = $conn->prepare($sql);
 $result = $query->execute([':email' => 'mm@mmm']);
 
 print_r($result); // 1

When I use code below in a file, result is ‘0’.

$sql = 'SELECT (user_id) FROM users WHERE email = :email';
    
$query = $conn->prepare($sql);
$query->execute([':email' => 'mm@mmm']);
    $result = $query->rowCount();
    print_r($result); // 0

My question is, what is wrong with the first code.