Activities does not seem to be relevant here, since you're just counting orders.
I assume clients are orders are directly related by a client id.
In Clients, add a global field... you could call it gStartDate
On file open, you could have this automatically set to January 1 of the current year... Date ( 1 ; 1 ; Year ( Get ( CurrentDate ) ) ), or you could also set it manually.
On the relationship graph, add a new table occurrence for Orders. I'd call it client_ORDERS|Filtered_AfterDate
Connect it to CLIENTS using the client id, and add an additional connection between your new global field and the order date. Use the ≥ or ≤ operator (depending on what side its on) so that the relationship brings in orders having a date greater than or equal to the global field in clients.
Now you can add a calculation field in clients: Count ( client_ORDERS|Filtered_AfterDate::id )
(specify your primary key in orders or any field that is guaranteed non-empty)
This was so easy that I had look at myself and realise that I was just being lazy.
Thanks for pointing this out. The script took ten times as much effort and was a hundred times slower.
A lesson learned.