If you don't mind jQuery (my preference), the following demonstrates using a dummy script
element (with unknown type) to hold a template for new items (much nicer than in-line strings in the code):
<script id="template" type="text/template">
<li><a href="Imagenes/img{n}.png" class="image-link"><img src="Imagenes/img{n}.png" alt="Img{n}" title="Img{n}"/></a></li>
</script>
JSFiddle: http://jsfiddle.net/TrueBlueAussie/vs6K9/1/
var $images = $('#Images');
var template = $('#template').html();
template = template.replace(/\{n\}/g, counter);
$images.append(template);
The code just replaces the {n} marker with your new value then appends the template. It uses a regular expression with the g
global flag as replace
normally replaces only the first match.
I just appended the images to a new div and left your existing code in place.
Based on the comment, if you want the image numbers to start at say 6, use this:
JSFiddle: http://jsfiddle.net/TrueBlueAussie/vs6K9/26/
var $images = $('#Images');
var template = $('#template').html();
template = template.replace(/\{n\}/g, $images.children().length +6);
$images.append(template);
Note: also now made the images list a UL instead of DIV (my bad) :)