Let $G = F_X$ be the free group on a finite set $X$, and $\phi\colon G\to G$ a group homomorphism. Consider the number
$$ \sum_{x\in X} (\text{number of occurrences of the generator $x$ in the word $\phi(x)$}) $$
where occurrences of $x^{-1}$ are counted negatively. Does this number bear any significance in group theory? Note that if $\phi$ is the identity map, the formula above reduces to the rank of $G$.
Background: a finitely generated free group $G$ has a classifying space $B G$ which is Spanier-Whitehead dualizable, hence the endomorphism $B \phi\colon B G \to B G$ has a Lefschetz number. The formula above computes $1 - L(B \phi)$.