using sql count and sub queries.

I need to count two different fields using different criteria from the same
table and can't get it to work.  See below for sample.  I need a count when
column correct = response and I need another count for the resp_count column
when it = 1.  The following query returns nothing.

SELECT
 loga."password",
 loga."number" as Lesson,
 loga."Resp_Count",
 count(loga."Correct") as Correct
from log
as loga
where Loga."response" = loga."correct"
 and loga."Password" = :password
 and loga."Resp_Count" = (Select count(log."Resp_Count")
                          from log where
                          log."Password" = loga."password"
                          and Log."Number" = loga."Number"
                          and log."resp_Count" = 1)
group by loga."password",loga."number",loga."Resp_Count"

All suggestions are appreciated.

Dianne
dia...@pcsonline.com