Code die ik nu al heb:
$get_input = "
SELECT a.ean13, a.id_soort, a.id_framemaat, COUNT(*) AS amount
FROM shop_product_attribute p
JOIN Adcount_input a ON p.ean13 = a.ean13
GROUP BY a.ean13, a.id_soort, a.id_framemaat
";
$result_input = mysql_query($get_input) or die(mysql_error());
while($input_row = mysql_fetch_array($result_input)) {
echo 'ean13: '.$input_row['ean13'].
' | id_soort: '.$input_row['id_soort'].
' | id_framemaat: '.$input_row['id_framemaat'].
' | AMOUNT: '.$input_row['amount'].'<br />';
}Het is de bedoeling dat shop_product_attribute_combination.id_attribute
gevonden wordt waar shop_product_attribute_combination.id_product_attribute = shop_product_attribute.id_product.
dan moet Adcount_Input geteld worden waar shop_product_attribute_combination.id_attribute = id_soort & id_framemaat.
Ik ben nog steeds aan het zoeken als je tips of advies heb mag je deze ook altijd posten misschien dat deze mij verder op weg helpen.
Overzichtje van tabbelen:

Toevoeging op 30/12/2014 20:50:34:
de code hieronder doet al een groot gedeelte van het werk, echter moet nog steeds de dames en heren fietsen gescheiden worden in de telling.
Nu moeten soort fietsen nog gescheiden worden van elkaar
iets zoals "pac.id_attribute LIKE i.id_soort" alleen wanneer ik dit doe krijg ik geen result.
is er een een andere manier ?
$get_input = "
SELECT p.id_product, pac.id_attribute, pac.id_product_attribute, COUNT(*) AS amount
FROM shop_product_attribute AS p, shop_product_attribute_combination AS pac, Adcount_input AS i
WHERE pac.id_product_attribute = p.id_product_attribute AND pac.id_attribute LIKE i.id_framemaat
GROUP BY id_product_attribute
";