Template combining documents [SOLVED]

So, the title is perhaps not completely fitting to my problem, but basically I want to use an if statement in the {{#each}} part, where if a div with the same name already exist, +1 the value, if not, create new div…

currently i have everything outputted as basically as this:

Template.body.helpers ({
	connections() {
	    return full_URI.find({});
	}
});

<div id="connections_field">
	{{#each connections}}
	{{> connection}}
	{{/each}}
</div>

<template name="connection">
	<div class="block" size="" pixelSize="" style="width: 100px; height: 100px;">
		<div class="information">
			<span class="amount"></span><br>
			<span class="url" link=""></span>
		</div>
	</div>
</template>