lib/DBMerge.pm 

sub source_row_count {
    my($self, $from_where) = @_;
    return $self->_db_row_count(
        $self->source_dbh, $from_where
    );
}

sub _db_row_count {
    my($self, $dbh, $from_where) = @_;
    my $sql = "SELECT count(*) FROM $from_where";
    my $row = $dbh->selectrow_arrayref($sql);
    return $row->[0];
}