I have got a funny html page that will run Javascript via different invokes but not between <script> tags.

It's a simple function with a 1 second timer.

If I invoke the script via body onload it runs e.g.
Code:
<body onload="count();">

If I invoke via a input button it runs e.g.
<input type="button" value="Start Count" onclick="count()" />
if I invoke via script tags it does not run and there is no error message or output. e.g.
<script type="text/javascript" language="JavaScript">
count();
</script>

The page I am working with is auto generated and all the dynamic code is from a MySQL database and placed in the page via a templating system, there I do not have access to the body tag so I can not use body onload event to trigger the count.

Currently I am using the input button to invoke the javascript count function but do need to use the script tags instead.

Can anyone shed a light as to why the invoke works but not via script tags.

Thanks

PS, in a new blank html page the javascript script tags invoke the javascript count function perfectly as it should do.