What are the implications of relying on the rowCount() function in PDO for portable applications?

Relying on the `rowCount()` function in PDO for portable applications can be problematic because it may not work consistently across different database drivers. To ensure portability, it is recommended to use a `SELECT COUNT(*)` query to get the number of rows instead.

$stmt = $pdo->query("SELECT COUNT(*) FROM your_table");
$rowCount = $stmt->fetchColumn();