More compact, but essentially the same as the previous ones:
use strict;
use warnings;
my %domains;
$domains{(split /@/)[-1]}++ for <DATA>;
print map "# $domains{$_} $_", sort keys %domains;
__DATA__
jaja@email.com
kaka@myemail.com
baba@youremail.com
lala@email.com
Output:
# 2 email.com
# 1 myemail.com
# 1 youremail.com
CountZero
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James