I have a workflow on an opportunity. I am trying to count the number activities from the opportunity workflow.
And use this count on condition within the workflow.
I agree with Matt's answer. You need to hook a custom workflow activity in order to get the Opportunity object that you are currently interesting on, and finally inside the custom workflow activity, you can use CRM SDK to find the related activites regarding the opportunity.
Here is the link to setup a basic custom workflow activity : http://www.stunnware.com/crm2/topic.aspx?id=CustomWorkflowActivity