I have two sheets.
This is the first sheet. Named 3

And this is the second sheet. Named centralizare

I have to write in Sheet2 C5 the number of 'Id garantie' from Sheet1 if the 'Categorie' from Sheet1 is 'Done' (Sheet2 B5) and 'Status 1'from Sheet1 is 'In lucru' (Sheet 2 B4)
I tried this
=COUNT(INDEX('3'!$C$2:$C$99,MATCH(B5,'3'!A2:A99,0)))
but it returns only one number if only the 'Categorie' is Done.
And other method with errors
=MATCH('3'!C2:C99,(centralizare!C5='3'!B2:B96)*(D4='3'!F2:F96),0)
=INDEX('3'!$C$2:$C$99,MATCH(D5,'3'!C2:C99,0))
=COUNT(INDEX('3'!A2:A96, MATCH("In lucru",'3'!E2:E96)))
=COUNTIFS('3'!$A$2:$A$99,B5,'3'!$C$2:$C$99,C$4)???=COUNTIFS('3'!$A$2:$A$99,$B5,'3'!$E$2:$E$99,C$4)will be correct then :P