Added a function that counts the total amount of tuples