Beräkning av typer och antal element