I think this is not possible. Parameters can only be set before the run, not when running. Only a workspace split in two parts with a WorkspaceRunner can do that.
You could try and use VariableSetter and Retriever but those can react fishy in combination with featurecaching.
Depending on the workspace, I would use a StatisticsCalculator at the start and keep the attribute attached until needed.
Or a FeatureWriter and a FeatureReader which writes the number to a temp file, but this probably has a similar effect as the VariableSetter and VariableRetriever.
As @nielsgerrits said, StatisticsCalculator is a great solution. If it is too difficult to keep it exposed on all features, you could make use of a FeatureMerger mid process and merge a single feature with the total count into the workflow at the required point.