You are already changing the value of Analyst, but you are not committing it to the database. Double click your second activity (Change ‘Analyst’) and set the radiobutton for 'Commit’ to yes.
The first and third activities create a list of objects in memory that are different objects and do not contain the same object as your input parameter. Set a breakpoint on the last activity and run your code. You will see different ids for objects. So the first and third activity can get removed.
If you're looking for the number of docs per analyst you need to do a retrieve on docs over the doc_analyst association so you only get the docs for that analyst. Then do a aggregate list action (count) to get the count. Then change analyst and set the # of docs attribute and like Tim says check the commit box (and probably refresh in client). Do probaby don't need to commit the list of docs, as I'm assuming they're already commited earlier on.