I'm doing a query and need to count the number of rows returned, I'm not usually accustomed to doing this in PDO, follow my code below.
$sqlCODCEL = $conn->prepare("SELECT * FROM tbl_CELULAS WHERE TXT_CODIG_SECUR = :codCEL");
$sqlCODCEL->bindParam(":codCEL", $lbl_CODCELULA);
$linha = $sqlCODCEL->fetchAll();
$count = count_chars($linha);
error_log($count);