How Many times a given integer appears - My Code