Please use code tags. As for your second loop, there is no need for a
if(list i ==0) break;
As far as the count goes, it doesn't seem that hard. In pseudocode it should be like this:
1 2 3 4 5
iterate through the numbers 1 to 50
iterate through every number entered
increment count everytime the number that is 1-50 appears increment count
if count is not equal to 0
output the count