added function to count card value to header