That works, Kammak! Thanks. I had just about same line, just the syntax was bad. Now I see, foreach is actually another form of "while", or "for...next".
1. edit
Bugger!!
When I tested it, I found a problem! It only counts soldiers that are unmounted or mounted as driver (I think also as gunner and commander). But it is not counting soldiers, that are inside a car as passengers - cargo. As there is no command for "cargo _vehicle" and command "_soldier in _vehicle" is only working for a specific soldier on a specific vehicle, I cannot see a solution.
How can I then count all soldiers in a vehicle, not only crewmembers?
2. edit
No, wait it is not true! The problem is another place in the whole project, not in count line! If the unit has no driver, then it is not inside triggers list as it then counts as civilian vehicle and all east units inside are not even looked at!
3. edit
Ok now I have found the stone of wisdom. As I realize, my trigger has to be to anybody, so it can take also civilian vehicles (without driver) with east units in them. And the count line has to be {drums, increasing volume} that:
{eastcount = eastcount + ("side _x == east" count (crew _x))} foreach list unitsleft
I was so happy, that the two "_x" did not clash together making the same variable instead of two! A small problem there still is, if the unit is just in the same moment gettingin/disembarking a vehicle, he can be lost in space and not counted in that.