How to create a facebook -like notification badge

One problem I can see right away is this snippet:

	     	var count = ' ';
	        
	        function changeCounter() {
			    count++;

What does count++ do for a string? In fact, the whole way changeCounter is written and called doesn’t make sense. You’re calling it exactly once during your definitions, when you should be updating the counter somewhere inside the success: portion of your ajax call, probably to something like items.length – but without seeing any of your console output, I can’t tell