require_once 'vendor/autoload.php'; use Propel\Runtime\Propel; Propel::init('path/to/propel.php.conf'); $count = MyTablePeer::doCount(new \Criteria()); echo "Total rows: " . $count;
require_once 'vendor/autoload.php'; use My\Library\Database\MyTablePeer; $count = MyTablePeer::doCountByColumn('status', 'published'); echo "Total published rows: " . $count;This example uses the doCountByColumn method to count all the rows in "MyTable" table where status equals 'published'. It uses a custom library for database accessing. In both examples, the doCount method returns an integer, which represents the count of the matching rows. Based on the examples, it seems that the package/library used could vary, it could either be Propel ORM library or a custom library for database accessing.