If as implied by your profile you're using XL2007 then use COUNTIFS

=COUNTIFS(A:A,1,F:F,1)
For backwards compatibility purposes:

=SUMPRODUCT((A1:A1000=1)*(F1:F1000=1))
note entire column references should not (can not pre XL2007) be used