[proofplan]
We use the shelling homotopy theorem: a finite pure shellable $d$-dimensional simplicial complex is homotopy equivalent to a wedge of $d$-spheres, with one sphere for each facet whose restriction face is the whole facet. Reduced homology is invariant under homotopy equivalence, so the problem reduces to computing the reduced homology of a wedge of spheres. A wedge of $r$ copies of $S^d$ has reduced homology $k^r$ in degree $d$ and vanishes in every degree below $d$, with the case $r=0$ interpreted as a contractible space.
[/proofplan]
[step:Identify the number of spherical summands from the shelling]
Let $F_1,F_2,\dots,F_m$ be the chosen shelling order of the facets of $K$, and let $R(F_j) \subseteq F_j$ denote the restriction face of the facet $F_j$ in this shelling order. Let $|K|$ denote the geometric realization of $K$, and let $S^d$ denote the $d$-dimensional sphere. Define the integer $r$ by
\begin{align*}
r := \#\{j \in \{1,\dots,m\} : R(F_j) = F_j\}.
\end{align*}
Since $K$ is finite, pure, shellable, and $d$-dimensional, and since $F_1,F_2,\dots,F_m$ is a shelling order, the hypotheses of the shelling homotopy theorem for finite pure shellable complexes are satisfied. That theorem states that $|K|$ is homotopy equivalent to a wedge of $d$-spheres, with one summand for each facet whose restriction face is the whole facet. Hence
\begin{align*}
|K| \simeq \bigvee_{\ell=1}^{r} S^d.
\end{align*}
If $r=0$, the wedge is interpreted as a one-point space, hence contractible. This citation is to the standard shelling homotopy theorem; it should be replaced by an Androma theorem link once that result is available.
[guided]
Let $F_1,F_2,\dots,F_m$ be the chosen shelling order of the facets of $K$. This order builds $K$ facet by facet. For each $j \in \{1,\dots,m\}$, let $R(F_j) \subseteq F_j$ denote the restriction face of $F_j$ in this shelling order; it records the minimal new face introduced when $F_j$ is attached. Let $|K|$ denote the geometric realization of $K$, and let $S^d$ denote the $d$-dimensional sphere.
Define the integer $r$ by
\begin{align*}
r := \#\{j \in \{1,\dots,m\} : R(F_j) = F_j\}.
\end{align*}
The shelling homotopy theorem for finite pure shellable complexes applies because the theorem statement gives exactly the needed hypotheses: $K$ is finite, pure, shellable, and $d$-dimensional, and $F_1,F_2,\dots,F_m$ is a shelling order. The theorem states that the geometric realization of such a complex is homotopy equivalent to a wedge of $d$-spheres, one for each facet whose restriction face is the whole facet. The facets counted by $r$ are therefore exactly the facets that create top-dimensional spherical summands in the shelling homotopy type. Hence
\begin{align*}
|K| \simeq \bigvee_{\ell=1}^{r} S^d.
\end{align*}
When $r=0$, there are no spherical summands; by convention the empty wedge is a one-point space, which is contractible. This uses the standard shelling homotopy theorem as an external result until an Androma theorem entry is available.
[/guided]
[/step]
[step:Compute the reduced homology of the resulting wedge]
Reduced simplicial homology of $K$ agrees with the reduced singular homology of $|K|$ with coefficients in $k$, and reduced homology is invariant under homotopy equivalence. Hence
\begin{align*}
\tilde H_i(K;k)
\cong
\tilde H_i\left(\bigvee_{\ell=1}^{r} S^d;k\right)
\end{align*}
for every integer $i$.
For $r \geq 1$, the reduced homology of a finite wedge of spheres is $k^r$ in degree $d$ and $0$ in every other degree. Equivalently, for $i=d$,
\begin{align*}
\tilde H_d\left(\bigvee_{\ell=1}^{r} S^d;k\right)
\cong k^r,
\end{align*}
and for $i \neq d$,
\begin{align*}
\tilde H_i\left(\bigvee_{\ell=1}^{r} S^d;k\right)
\cong 0.
\end{align*}
For $r=0$, the wedge is contractible, so
\begin{align*}
\tilde H_i\left(\bigvee_{\ell=1}^{0} S^d;k\right)=0
\end{align*}
for every integer $i$.
[/step]
[step:Read off the vanishing and the top-dimensional rank]
Combining the homotopy equivalence with the wedge computation gives
\begin{align*}
\tilde H_i(K;k)=0
\end{align*}
for every $i<d$. In degree $d$, the same computation gives
\begin{align*}
\dim_k \tilde H_d(K;k)=r.
\end{align*}
By the definition of $r$,
\begin{align*}
r=\#\{j \in \{1,\dots,m\} : R(F_j)=F_j\}.
\end{align*}
Therefore
\begin{align*}
\dim_k \tilde H_d(K;k)
=
\#\{j \in \{1,\dots,m\} : R(F_j)=F_j\},
\end{align*}
which is the desired formula.
[/step]