MySQL Group By: ignore when any entry does not match a condition
<p>I want to group by type, but should ignore when there's any entry with the status 1.</p>

<p>I tried to do it with <code>IF</code>, but failed.
After a lot of search, I didn't find anything like that, so I decided to ask your help.</p>

<hr>

<p>Table Example:</p>

<pre><code>|  id   -  status   -   type   |
|   1   -    0      -     1    |
|   2   -    2      -     1    |
|   3   -    1      -     1    | - Should ignore all group - status 1.
|   4   -    3      -     2    |
|   5   -    0      -     2    |
|   6   -    3      -     2    |
|   7   -    2      -     3    |
|   8   -    0      -     3    |
|   9   -    3      -     3    |
|   9   -    2      -     3    |
|   10  -    1      -     4    | - Should ignore all group - status 1.
|   11  -    2      -     4    |
|   12  -    0      -     4    |
|   13  -    1      -     4    | - Should ignore all group - status 1.
</code></pre>

<hr>

<p>Code:</p>

<pre><code>SELECT type, count(*) FROM table GROUP BY type;
</code></pre>

<hr>

<p>What I get:</p>

<pre><code>|  type   -  count(*) |
|   1     -     3     |
|   2     -     3     |
|   3     -     4     |
|   4     -     4     |
</code></pre>

<hr>

<p>What I want:
(type 1 and 4 should be ignored, because have entries with status 1)</p>

<pre><code>|  type   -  count(*) |
|   2     -     3     |
|   3     -     4     |
</code></pre>