count(); //count rows from "products" table using query builder echo "There are ".$count." products in the database."; //output number of products in the table ?>In this example, we are using the query builder from Laravel framework to count the number of rows in the "products" table. We store the result in the $count variable and output the number of products in the table. This example uses Laravel package library for PHP.