title: Counting rows from a subquery
body: <p>How could I count rows from a SELECT query as a value?
  Such as </p>
  
  <pre><code>SELECT FUCNTIONIMLOOKINGFOR(SELECT * FROM anothertable) AS count FROM table;
  </code></pre>
  
  <p>So that count is an integer of how many rows the subquery <code>SELECT * FROM anothertable</code> returns.</p>
  
  <p><strong>EDIT</strong></p>
  
  <pre><code>SELECT p.PostPID, p.PostUID, p.PostText, p.PostTime, u.UserUID, u.UserName, u.UserImage, u.UserRep,
      (
          SELECT COUNT(f.FlagTime)
              FROM Flags as f 
                  JOIN Posts as p 
                  ON p.PostPID = f.FlagPID
      ) as PostFlags
      FROM Posts AS p
          JOIN Users AS u
          ON p.PostUID = u.UserUID
      ORDER BY PostTime DESC
      LIMIT 0, 30
  </code></pre>