I have a commutative unital ring $R$, a full additive subcategory $\mathcal{C}$ of $\text{Mod}_R$ that is closed under isomorphisms and an operation $f \colon \mathrm{Ob}(\mathcal{C}) \to \mathbb{Z}_{\geq0}$ with the following properties:
If $A$ and $B$ are isomorphic objects in $\mathcal{C}$, then $f(A)=f(B)$.
$f(A\oplus B)=f(A)+f(B)$ for all objects $A$, $B$ in $\mathcal{C}$.
Is there a widely accepted name for such an operation? I have a number of examples of these that I am using to classify objects in such a category $\mathcal{C}$ by their direct sum representations.
PS: No object in $\mathcal{C}$ can be written as an infinite sum of non-zero $R$-modules.
The term "invariant" is often used for a function which maps isomorphic objects to the same thing. And the second property is commonly called additivity. Hence, as already said in the comments, "additive invariant" is a proper name for this, maybe even "$\mathbb{N}$-valued additive invariant". But just to be sure, when you use this somewhere, better add the definition. Also notice that what you describe is the same as an additive functor $\mathcal{C}_{\cong} \to \mathbb{N}$, where $\mathcal{C}_{\cong}$ is the core of $\mathcal{C}$.