<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span class="Apple-style-span" style="font-family: arial; font-size: small;">Is there any solution NOT involving COUNT() ?<div>
<br></div><div>Otherwise the Drupal Handbook (<a href="http://drupal.org/node/161974">http://drupal.org/node/161974</a>) has the most straightforward PHP snippet:</div><div><br></div><div><span class="Apple-style-span" style="font-family: 'Bitstream Vera Sans Mono',Monaco,'Lucida Console',monospace; font-size: 12px; line-height: 18px; white-space: pre-wrap;"><span style="border-width: 0px; background-color: transparent; font-size: 12px; margin: 0px; padding: 0px; vertical-align: baseline; color: rgb(0, 0, 187);"><?php<br>
$mytype </span></span><span class="Apple-style-span" style="font-family: 'Bitstream Vera Sans Mono',Monaco,'Lucida Console',monospace; font-size: 12px; line-height: 18px; white-space: pre-wrap;"><span style="border-width: 0px; background-color: transparent; font-size: 12px; margin: 0px; padding: 0px; vertical-align: baseline; color: rgb(0, 119, 0);">= </span></span><span class="Apple-style-span" style="font-family: 'Bitstream Vera Sans Mono',Monaco,'Lucida Console',monospace; font-size: 12px; line-height: 18px; white-space: pre-wrap;"><span style="border-width: 0px; background-color: transparent; font-size: 12px; margin: 0px; padding: 0px; vertical-align: baseline; color: rgb(221, 0, 0);">'job'</span></span><span class="Apple-style-span" style="font-family: 'Bitstream Vera Sans Mono',Monaco,'Lucida Console',monospace; font-size: 12px; line-height: 18px; white-space: pre-wrap;"><span style="border-width: 0px; background-color: transparent; font-size: 12px; margin: 0px; padding: 0px; vertical-align: baseline; color: rgb(0, 119, 0);">; </span></span><span class="Apple-style-span" style="font-family: 'Bitstream Vera Sans Mono',Monaco,'Lucida Console',monospace; font-size: 12px; line-height: 18px; white-space: pre-wrap;"><span style="border-width: 0px; background-color: transparent; font-size: 12px; margin: 0px; padding: 0px; vertical-align: baseline; color: rgb(255, 128, 0);">// <<---------- set your content type here.<br>
</span></span><span class="Apple-style-span" style="font-family: 'Bitstream Vera Sans Mono',Monaco,'Lucida Console',monospace; font-size: 12px; line-height: 18px; white-space: pre-wrap;"><span style="border-width: 0px; background-color: transparent; font-size: 12px; margin: 0px; padding: 0px; vertical-align: baseline; color: rgb(0, 0, 187);">$results </span></span><span class="Apple-style-span" style="font-family: 'Bitstream Vera Sans Mono',Monaco,'Lucida Console',monospace; font-size: 12px; line-height: 18px; white-space: pre-wrap;"><span style="border-width: 0px; background-color: transparent; font-size: 12px; margin: 0px; padding: 0px; vertical-align: baseline; color: rgb(0, 119, 0);">= </span></span><span class="Apple-style-span" style="font-family: 'Bitstream Vera Sans Mono',Monaco,'Lucida Console',monospace; font-size: 12px; line-height: 18px; white-space: pre-wrap;"><span style="border-width: 0px; background-color: transparent; font-size: 12px; margin: 0px; padding: 0px; vertical-align: baseline; color: rgb(0, 0, 187);">db_query</span></span><span class="Apple-style-span" style="font-family: 'Bitstream Vera Sans Mono',Monaco,'Lucida Console',monospace; font-size: 12px; line-height: 18px; white-space: pre-wrap;"><span style="border-width: 0px; background-color: transparent; font-size: 12px; margin: 0px; padding: 0px; vertical-align: baseline; color: rgb(0, 119, 0);">(</span></span><span class="Apple-style-span" style="font-family: 'Bitstream Vera Sans Mono',Monaco,'Lucida Console',monospace; font-size: 12px; line-height: 18px; white-space: pre-wrap;"><span style="border-width: 0px; background-color: transparent; font-size: 12px; margin: 0px; padding: 0px; vertical-align: baseline; color: rgb(221, 0, 0);">"SELECT COUNT(DISTINCT(nid)) FROM {node} WHERE type='%s' AND status=1"</span></span><span class="Apple-style-span" style="font-family: 'Bitstream Vera Sans Mono',Monaco,'Lucida Console',monospace; font-size: 12px; line-height: 18px; white-space: pre-wrap;"><span style="border-width: 0px; background-color: transparent; font-size: 12px; margin: 0px; padding: 0px; vertical-align: baseline; color: rgb(0, 119, 0);">, </span></span><span class="Apple-style-span" style="font-family: 'Bitstream Vera Sans Mono',Monaco,'Lucida Console',monospace; font-size: 12px; line-height: 18px; white-space: pre-wrap;"><span style="border-width: 0px; background-color: transparent; font-size: 12px; margin: 0px; padding: 0px; vertical-align: baseline; color: rgb(0, 0, 187);">$mytype</span></span><span class="Apple-style-span" style="font-family: 'Bitstream Vera Sans Mono',Monaco,'Lucida Console',monospace; font-size: 12px; line-height: 18px; white-space: pre-wrap;"><span style="border-width: 0px; background-color: transparent; font-size: 12px; margin: 0px; padding: 0px; vertical-align: baseline; color: rgb(0, 119, 0);">);<br>
</span></span><span class="Apple-style-span" style="font-family: 'Bitstream Vera Sans Mono',Monaco,'Lucida Console',monospace; font-size: 12px; line-height: 18px; white-space: pre-wrap;"><span style="border-width: 0px; background-color: transparent; font-size: 12px; margin: 0px; padding: 0px; vertical-align: baseline; color: rgb(0, 0, 187);">$count </span></span><span class="Apple-style-span" style="font-family: 'Bitstream Vera Sans Mono',Monaco,'Lucida Console',monospace; font-size: 12px; line-height: 18px; white-space: pre-wrap;"><span style="border-width: 0px; background-color: transparent; font-size: 12px; margin: 0px; padding: 0px; vertical-align: baseline; color: rgb(0, 119, 0);">= </span></span><span class="Apple-style-span" style="font-family: 'Bitstream Vera Sans Mono',Monaco,'Lucida Console',monospace; font-size: 12px; line-height: 18px; white-space: pre-wrap;"><span style="border-width: 0px; background-color: transparent; font-size: 12px; margin: 0px; padding: 0px; vertical-align: baseline; color: rgb(0, 0, 187);">db_num_rows</span></span><span class="Apple-style-span" style="font-family: 'Bitstream Vera Sans Mono',Monaco,'Lucida Console',monospace; font-size: 12px; line-height: 18px; white-space: pre-wrap;"><span style="border-width: 0px; background-color: transparent; font-size: 12px; margin: 0px; padding: 0px; vertical-align: baseline; color: rgb(0, 119, 0);">(</span></span><span class="Apple-style-span" style="font-family: 'Bitstream Vera Sans Mono',Monaco,'Lucida Console',monospace; font-size: 12px; line-height: 18px; white-space: pre-wrap;"><span style="border-width: 0px; background-color: transparent; font-size: 12px; margin: 0px; padding: 0px; vertical-align: baseline; color: rgb(0, 0, 187);">$results</span></span><span class="Apple-style-span" style="font-family: 'Bitstream Vera Sans Mono',Monaco,'Lucida Console',monospace; font-size: 12px; line-height: 18px; white-space: pre-wrap;"><span style="border-width: 0px; background-color: transparent; font-size: 12px; margin: 0px; padding: 0px; vertical-align: baseline; color: rgb(0, 119, 0);">);<br>
echo </span></span><span class="Apple-style-span" style="font-family: 'Bitstream Vera Sans Mono',Monaco,'Lucida Console',monospace; font-size: 12px; line-height: 18px; white-space: pre-wrap;"><span style="border-width: 0px; background-color: transparent; font-size: 12px; margin: 0px; padding: 0px; vertical-align: baseline; color: rgb(221, 0, 0);">"There are currently $count jobs in our database."</span></span><span class="Apple-style-span" style="font-family: 'Bitstream Vera Sans Mono',Monaco,'Lucida Console',monospace; font-size: 12px; line-height: 18px; white-space: pre-wrap;"><span style="border-width: 0px; background-color: transparent; font-size: 12px; margin: 0px; padding: 0px; vertical-align: baseline; color: rgb(0, 119, 0);">;<br>
</span></span><span class="Apple-style-span" style="font-family: 'Bitstream Vera Sans Mono',Monaco,'Lucida Console',monospace; font-size: 12px; line-height: 18px; white-space: pre-wrap;"><span style="border-width: 0px; background-color: transparent; font-size: 12px; margin: 0px; padding: 0px; vertical-align: baseline; color: rgb(0, 0, 187);">?></span></span></div>
<div><font class="Apple-style-span" color="#0000bb" face="'Bitstream Vera Sans Mono', Monaco, 'Lucida Console', monospace"><span class="Apple-style-span" style="font-size: 12px; line-height: 18px; white-space: pre-wrap;"><br>
</span></font></div><div><span style="border-width: 0px; background-color: transparent; margin: 0px; padding: 0px; vertical-align: baseline;"></span><font class="Apple-style-span" face="'Bitstream Vera Sans Mono', Monaco, 'Lucida Console', monospace"><span class="Apple-style-span" style="line-height: 18px; white-space: pre-wrap;">Victor Kane</span></font></div>
<div><font class="Apple-style-span" face="'Bitstream Vera Sans Mono', Monaco, 'Lucida Console', monospace"><span class="Apple-style-span" style="line-height: 18px; white-space: pre-wrap;"><a href="http://awebfactory.com.ar">http://awebfactory.com.ar</a></span></font></div>
<div><font class="Apple-style-span" face="'Bitstream Vera Sans Mono', Monaco, 'Lucida Console', monospace"><span class="Apple-style-span" style="line-height: 18px; white-space: pre-wrap;"><a href="http://projectflowandtracker.com">http://projectflowandtracker.com</a><br>
</span></font><br><div class="gmail_quote">On Wed, Dec 22, 2010 at 11:16 AM, Denis Lafont-Trevisan<span class="Apple-converted-space"> </span><span dir="ltr"><<a href="mailto:denis.lafont@gmail.com">denis.lafont@gmail.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><br>Hi,<div><br></div><div>Just for the archive, the answer was using Views GroupBy module.</div>
<div><br></div><div>Cheers,<br><br></div><div>Denis</div><div><div class="h5"><div><br><div class="gmail_quote">On Wed, Dec 22, 2010 at 12:36 PM, Shai Gluskin<span class="Apple-converted-space"> </span><span dir="ltr"><<a href="mailto:shai@content2zero.com" target="_blank">shai@content2zero.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div><br>On Dec 22, 2010, at 3:23 AM, Denis Lafont-Trevisan <<a href="mailto:denis.lafont@gmail.com" target="_blank">denis.lafont@gmail.com</a>> wrote:<br>
<br>> Hi,<br>><br>> Sounds stupid but I can't manage to create a view that count the number of node of a certain type each user created.<br>><br>><br>> Any clue?<br>><br>> Cheers,<br>><br>> Denis<br>
</div></div>> --<br>> [ Drupal support list |<span class="Apple-converted-space"> </span><a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a><span class="Apple-converted-space"> </span>]<br>
<font color="#888888">--<br>[ Drupal support list |<span class="Apple-converted-space"> </span><a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a><span class="Apple-converted-space"> </span>]<br>
</font></blockquote></div><br></div></div></div><br>--<br>[ Drupal support list |<span class="Apple-converted-space"> </span><a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a><span class="Apple-converted-space"> </span>]<br>
</blockquote></div></div></span></span><br class="Apple-interchange-newline">