Help in counting the no of repeated words with count in a file

Hi Pls help in solving my doubt.Iam having file like below

file1.txt

 
priya
jenny
jenny
priya
raj
radhika
priya
bharti
bharti

Output required:
I need a output like count of repeated words with name for ex:

priya 3
jenny 2
bharti 2

pls help me its urgent

sort file1.txt | uniq -c

Thanks a lot

ruby -ne 'BEGIN{h={};h.default=0};h[$_.strip]+=1;END{h.each{|x| p x}}' file

To get your required output is quite fiddly. Building on "chirel" post we then sort to reverse order of count, eliminate those with a count of value one, and then reverse the count and name fields.

sort file1.txt | uniq -c | sort -nr | while read count name
do
        if [ ${count} -gt 1 ]
        then
                echo "${name} ${count}"
        fi
done

priya 3
jenny 2
bharti 2