Still working on that amusement park booking system, eh?
It sounds like you need to perform a "join" query to get what you're looking for - I'm assuming that you're using a mySQL db, so first:
"Somehow i need to check the current table for all the unique customer_id's..."
OK. A person has just booked a trip and you need to see how many other unique customers also booked the same trip. These customers exist across different tables. Let's say you have the name of the ride they just booked stored in a variable named $this_ride, and you've got "customer_id" fields in two tables, one called "current_table" and another called "former table"...
Query:
$query1 = " SELECT COUNT(DISTINCT customer_id) FROM current_table AS c, former_table AS d WHERE c.customer_id = d.customer_id AND d.current_ride = '$this_ride' ";
The COUNT function returns the number of all NON-NULL values in a recordset, while DISTINCT weeds out any duplicates.
Is this what you're going for?