Incremental counter Javascript/JQuery
<p>I'm trying to work out how to make this counter work. After a certain amount of animations have played, I want to make the page refresh. I know my code sucks. I'm not educated in this and I'm very new, not to mention it being difficult to concentrate (to say the least) where I'm staying at the moment... so be nice. Here it is:</p>

<pre><code>$(document).ready(function () {
    function loop() {
        var p = 0;
        if (p = 3) {
            location.reload(true);
        } else {
            $("#p3").delay("1000").fadeIn("slow");
            $("#p3").delay("1000").fadeOut("slow", loop);
            p + 1;
        };
        loop();
    });
</code></pre>
