NAME
Teng::Plugin::Count - Count rows in database.
NAME
package MyDB;
use parent qw/Teng/;
__PACKAGE__->load_plugin('Count');
package main;
my $db = MyDB->new(...);
$db->count('user'); # => The number of rows in 'user' table.
$db->count('user', '*', {type => 2}); # => SELECT COUNT(*) FROM user WHERE type=2
DESCRIPTION
This plugin provides shorthand for counting rows in database.