title: MySQL check count
body: <p>I defined a table like this:</p>
  
  <pre><code>CREATE TABLE `wms__aktion_successor` (
   `aktion_id` int(11) NOT NULL DEFAULT '0',
   `successor_aktion_id` int(11) NOT NULL,
   PRIMARY KEY (`aktion_id`,`successor_aktion_id`)
  )
  </code></pre>
  
  <p>I am searching for two given <code>aktion_id</code> if they have the same <code>successor_aktion_id</code>. I know already, that they have only one entry each as <code>aktion_id</code>.</p>
  
  <p>I thought about a solution with <code>ALL</code> or something like this, but I have no correct idea.</p>
  
  <p>My initial idea was</p>
  
  <pre><code>SELECT count(*)=2 
  FROM `wms__aktion_successor` 
  WHERE 
    (
        (`aktion_id`=5 AND `successor_aktion_id`=6) 
         OR
        (`aktion_id`=13 AND `successor_aktion_id`=6)
    )
  </code></pre>
  
  <p>but then I have to know the <code>successor_aktion_id</code>.</p>