A rowcount that would return the record count with a select statement would be extremely usefull in PDO. However since it doesn't exist here is an another method to return the record count.
$sql = "SELECT * FROM tblusers ";
$prepstatement = $db->prepare($sql);
$prepstatement->execute();
//save the results to array
$result = $prepstatement->fetchAll();
//count the array
$resultcount = count($result);
echo "resultcount : ".$resultcount ."<br>";
foreach($result as $field) {
echo "username: ".$field[username]."<br>";
echo "<br>";
}
unset($sql, $result, $resultcount);