in reply to Perform addition of data from rows

I would look into using DBIx::Class to count a particular column.
use strict; use warnings; use DBIx::Class; my $rs = $schema->resultset('YOURTABLENAMEHERE')->search( {}, { columns => [ qw/name/ ], distinct => 1 } ); my $count = $rs->count;
That was basically straight from here: https://metacpan.org/pod/distribution/DBIx-Class/lib/DBIx/Class/Manual/Cookbook.pod