Firstly, attribute values must be quoted (so that's align="center" or even align=\"center\" being as you're using Javascript) unless they're pure number values (no units or funny business), and even then it doesn't hurt. Secondly, it's a recommendation that you leave a space before the / of a self-closing tag to seperate it from the last attribute.
Try:
Code:
document.write("<table align=\"center\" width=\"50%\" border=1 /><tr><td align=\"center\" />"+count+"</td></tr></table><br />");
Nothing to do with your problem, but I should point out that every single attribute you've applied to that table and td has been superseded by CSS.
Code:
HTML CSS
width="50%" width: 50%;
align="center" text-align: center;
border=1 border: solid 1px;
Bookmarks