title: MYSQL query using count function
body: <p>This is a function where I have to retrieve from a database that stores direct graphs. I have a graph table with columsn, graph name and graphID. and a node table that has columns nodeid, graphid, and has exitnode and entrynodes. I tried using the count statement to count the number of nodes that each graph has to return the name but it keeps returning empty sets. Can someone look over my query and tell me what I'm doing wrong. </p>
  
  <pre><code>SELECT
      graphName
    FROM 
      graphs 
    WHERE graphID 
      IN ( 
        SELECT 
           graphID 
         FROM 
           nodes 
         WHERE count(entryNode, exitNode) = 2
      );
  </code></pre>