in reply to Re^4: extract the value before a particualr string
in thread extract the value before a particualr string

No, that would be

$count = $1 if $line =~ /\s+?(\d+?)\/total$/;