Weighted trace after pullback is multiplication by degree
Assume the coefficient-restriction isomorphism for etale cohomology: restriction along any commutative-ring homomorphism preserves cohomology of every simplicial presheaf with coefficients in a sheaf over the target ring. Let $\ell$ be prime, let $p:Z\to S$ be a finite morphism of schemes, and let $w$ assign an integer to every geometric point of $Z$. Assume $\ell$ is invertible on $S$, that $w$ has the local constancy property below, and that for every geometric point $x$ of $S$, $$\sum_{z\in p^{-1}(x)}w(z)=d$$ for a fixed $d\in\mathbb Z$. For every $n,i\in\mathbb Z$, the weighted trace and pullback on rational $\ell$-adic etale cohomology satisfy $$\operatorname{Tr}_{p,w}\circ p^*=d\,\operatorname{id}:H^n(S,\mathbb Q_\ell(i))\to H^n(S,\mathbb Q_\ell(i)).$$
For every base change square $V\to Z$ over $U\to S$ and every locally constant integer function $\varphi$ on $V$, the geometric-fibre sum $x\mapsto\sum_{z\in V_x}w(z)\varphi(z)$ must come from a locally constant integer function on $U$. The trace uses these weights. The weighting is specified for geometric points over every algebraically closed field; the fibre sums use distinct geometric lifts.