count record of form A with a criteria from fom B linked with a lookup

count record of form A with a criteria from fom B linked with a lookup

Hi

let Say 
I've got a form Account
  • ID
  • USER
  • + other fields

I'v got Also a form Submission
ID
AccountID (Form Account lookup with ID)
+ other fields

Now I want to count Submission that has the current loginuser has user. How can I do that?

I tried:
  1. Sub = Submission[( AccountID.UW == zoho.loginuser)].count();

but it doesn't work
How can I do that? do I need first to create a list of accountID that is assigned to the current user and then count submission that is in this list. if yes how?
thanks a lot for your help